summaryrefslogtreecommitdiff
path: root/src/py_balance.cc
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2009-11-19 21:53:02 -0500
committerJohn Wiegley <johnw@newartisans.com>2009-11-19 22:24:24 -0500
commit4e30fcdf4094a0c450cbe1918c2e12dd19eb58f2 (patch)
treee4bce67522d52cd7be03544501191d761dce7799 /src/py_balance.cc
parent6e31328bd62d15e8da4238394abd8de65539cfa2 (diff)
downloadfork-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.cc10
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)
;