From 4e30fcdf4094a0c450cbe1918c2e12dd19eb58f2 Mon Sep 17 00:00:00 2001 From: John Wiegley Date: Thu, 19 Nov 2009 21:53:02 -0500 Subject: Many improvements to Ledger's Python bindings --- src/py_balance.cc | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'src/py_balance.cc') 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) ; -- cgit v1.2.3