diff options
author | John Wiegley <johnw@newartisans.com> | 2004-09-10 05:07:50 -0400 |
---|---|---|
committer | John Wiegley <johnw@newartisans.com> | 2004-09-10 05:07:50 -0400 |
commit | e414123ecb472d1f86a2f1cfdbd2732144c20f0d (patch) | |
tree | cafc81314d337786ea0d8461a96110ee5b1d6fe2 /walk.cc | |
parent | 6261da4660a6602345c19d5a948124991bda86dc (diff) | |
download | fork-ledger-e414123ecb472d1f86a2f1cfdbd2732144c20f0d.tar.gz fork-ledger-e414123ecb472d1f86a2f1cfdbd2732144c20f0d.tar.bz2 fork-ledger-e414123ecb472d1f86a2f1cfdbd2732144c20f0d.zip |
change commodity->symbol to const, and added set_symbol
Diffstat (limited to 'walk.cc')
-rw-r--r-- | walk.cc | 13 |
1 files changed, 13 insertions, 0 deletions
@@ -335,6 +335,16 @@ struct item_handler_wrap : public item_handler<T> void (subtotal_transactions::*subtotal_transactions_flush)() = &subtotal_transactions::flush; +void py_walk_entries(journal_t& journal, item_handler<transaction_t>& handler) +{ + walk_entries(journal.entries, handler); +} + +void py_walk_transactions(entry_t& entry, item_handler<transaction_t>& handler) +{ + walk_transactions(entry.transactions, handler); +} + void export_walk() { class_< item_handler<transaction_t>, @@ -431,6 +441,9 @@ void export_walk() .def("flush", &item_handler<transaction_t>::flush) .def("__call__", &related_transactions::operator()); ; + + def("walk_entries", py_walk_entries); + def("walk_transactions", py_walk_transactions); } #endif // USE_BOOST_PYTHON |