diff options
author | John Wiegley <johnw@newartisans.com> | 2009-11-06 15:35:16 -0500 |
---|---|---|
committer | John Wiegley <johnw@newartisans.com> | 2009-11-06 15:35:16 -0500 |
commit | f03d386013f220e5b88a056c514c20319c83e9e7 (patch) | |
tree | 107234c2ca0947fac84be819611ff5c0c610dac6 /src/py_balance.cc | |
parent | 312d4c5f5339c61253e86cd9ce825370eb4be053 (diff) | |
parent | 205639669981f1ab9dc355d07c60c123c4da0ca0 (diff) | |
download | fork-ledger-f03d386013f220e5b88a056c514c20319c83e9e7.tar.gz fork-ledger-f03d386013f220e5b88a056c514c20319c83e9e7.tar.bz2 fork-ledger-f03d386013f220e5b88a056c514c20319c83e9e7.zip |
Merge branch 'next'
Diffstat (limited to 'src/py_balance.cc')
-rw-r--r-- | src/py_balance.cc | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/src/py_balance.cc b/src/py_balance.cc index 6d0ad500..73049c99 100644 --- a/src/py_balance.cc +++ b/src/py_balance.cc @@ -159,7 +159,7 @@ void export_balance() .def("negated", &balance_t::negated) .def("in_place_negate", &balance_t::in_place_negate, - return_value_policy<reference_existing_object>()) + return_internal_reference<>()) .def(- self) .def("abs", &balance_t::abs) @@ -170,23 +170,23 @@ void export_balance() .def("rounded", &balance_t::rounded) .def("in_place_round", &balance_t::in_place_round, - return_value_policy<reference_existing_object>()) + return_internal_reference<>()) .def("truncated", &balance_t::truncated) .def("in_place_truncate", &balance_t::in_place_truncate, - return_value_policy<reference_existing_object>()) + return_internal_reference<>()) .def("unrounded", &balance_t::unrounded) .def("in_place_unround", &balance_t::in_place_unround, - return_value_policy<reference_existing_object>()) + return_internal_reference<>()) .def("reduced", &balance_t::reduced) .def("in_place_reduce", &balance_t::in_place_reduce, - return_value_policy<reference_existing_object>()) + return_internal_reference<>()) .def("unreduced", &balance_t::unreduced) .def("in_place_unreduce", &balance_t::in_place_unreduce, - return_value_policy<reference_existing_object>()) + return_internal_reference<>()) .def("value", py_value_0) .def("value", py_value_1, args("primary_only")) @@ -209,6 +209,8 @@ void export_balance() .def("commodity_amount", py_commodity_amount_0) .def("commodity_amount", py_commodity_amount_1) + .def("number", &balance_t::number) + .def("strip_annotations", &balance_t::strip_annotations) .def("valid", &balance_t::valid) |