summaryrefslogtreecommitdiff
path: root/src/py_balance.cc
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2009-11-05 02:27:08 -0500
committerJohn Wiegley <johnw@newartisans.com>2009-11-05 02:27:42 -0500
commit8bd16b2e8e61f914767e3d0973e83f7326f11cbc (patch)
treeb7438f5e856b6d1be7fd1ab0c806d9eed9fa081e /src/py_balance.cc
parent34ee358f5e16d4018adf3db5dac31d2d9c16b9f5 (diff)
downloadfork-ledger-8bd16b2e8e61f914767e3d0973e83f7326f11cbc.tar.gz
fork-ledger-8bd16b2e8e61f914767e3d0973e83f7326f11cbc.tar.bz2
fork-ledger-8bd16b2e8e61f914767e3d0973e83f7326f11cbc.zip
Simplified usage of Boost.Python in several cases
Diffstat (limited to 'src/py_balance.cc')
-rw-r--r--src/py_balance.cc6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/py_balance.cc b/src/py_balance.cc
index effc6937..6d0ad500 100644
--- a/src/py_balance.cc
+++ b/src/py_balance.cc
@@ -214,6 +214,12 @@ void export_balance()
.def("valid", &balance_t::valid)
;
+ register_optional_to_python<balance_t>();
+
+ implicitly_convertible<long, balance_t>();
+ implicitly_convertible<string, balance_t>();
+ implicitly_convertible<amount_t, balance_t>();
+
#define EXC_TRANSLATE(type) \
register_exception_translator<type>(&exc_translate_ ## type);