From e414123ecb472d1f86a2f1cfdbd2732144c20f0d Mon Sep 17 00:00:00 2001 From: John Wiegley Date: Fri, 10 Sep 2004 05:07:50 -0400 Subject: change commodity->symbol to const, and added set_symbol --- walk.cc | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'walk.cc') diff --git a/walk.cc b/walk.cc index b80dfbc0..b98dd3f1 100644 --- a/walk.cc +++ b/walk.cc @@ -335,6 +335,16 @@ struct item_handler_wrap : public item_handler void (subtotal_transactions::*subtotal_transactions_flush)() = &subtotal_transactions::flush; +void py_walk_entries(journal_t& journal, item_handler& handler) +{ + walk_entries(journal.entries, handler); +} + +void py_walk_transactions(entry_t& entry, item_handler& handler) +{ + walk_transactions(entry.transactions, handler); +} + void export_walk() { class_< item_handler, @@ -431,6 +441,9 @@ void export_walk() .def("flush", &item_handler::flush) .def("__call__", &related_transactions::operator()); ; + + def("walk_entries", py_walk_entries); + def("walk_transactions", py_walk_transactions); } #endif // USE_BOOST_PYTHON -- cgit v1.2.3