diff options
author | John Wiegley <johnw@newartisans.com> | 2009-11-19 21:53:02 -0500 |
---|---|---|
committer | John Wiegley <johnw@newartisans.com> | 2009-11-19 22:24:24 -0500 |
commit | 4e30fcdf4094a0c450cbe1918c2e12dd19eb58f2 (patch) | |
tree | e4bce67522d52cd7be03544501191d761dce7799 /src/py_balance.cc | |
parent | 6e31328bd62d15e8da4238394abd8de65539cfa2 (diff) | |
download | fork-ledger-4e30fcdf4094a0c450cbe1918c2e12dd19eb58f2.tar.gz fork-ledger-4e30fcdf4094a0c450cbe1918c2e12dd19eb58f2.tar.bz2 fork-ledger-4e30fcdf4094a0c450cbe1918c2e12dd19eb58f2.zip |
Many improvements to Ledger's Python bindings
Diffstat (limited to 'src/py_balance.cc')
-rw-r--r-- | src/py_balance.cc | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/py_balance.cc b/src/py_balance.cc index 23a2ff73..5aed2b43 100644 --- a/src/py_balance.cc +++ b/src/py_balance.cc @@ -108,6 +108,13 @@ namespace { return (*elem).second; } + balance_t py_strip_annotations_0(balance_t& balance) { + return balance.strip_annotations(keep_details_t()); + } + balance_t py_strip_annotations_1(balance_t& balance, const keep_details_t& keep) { + return balance.strip_annotations(keep); + } + } // unnamed namespace #define EXC_TRANSLATOR(type) \ @@ -215,7 +222,8 @@ void export_balance() .def("number", &balance_t::number) - .def("strip_annotations", &balance_t::strip_annotations) + .def("strip_annotations", py_strip_annotations_0) + .def("strip_annotations", py_strip_annotations_1) .def("valid", &balance_t::valid) ; |