summaryrefslogtreecommitdiff
path: root/journal.cc
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2005-06-23 00:08:29 +0000
committerJohn Wiegley <johnw@newartisans.com>2008-04-13 02:41:13 -0400
commit368549f76d4ce5128ba96674a0f2b9d59e0b6db1 (patch)
treec1283ae4e041d156ba662d12f42de406e5e83fe2 /journal.cc
parent13524610c99a701540935b2c869a9a5a30d1d3a9 (diff)
downloadfork-ledger-368549f76d4ce5128ba96674a0f2b9d59e0b6db1.tar.gz
fork-ledger-368549f76d4ce5128ba96674a0f2b9d59e0b6db1.tar.bz2
fork-ledger-368549f76d4ce5128ba96674a0f2b9d59e0b6db1.zip
(export_journal): Added `basket' member for journals, and `beg_line'
and `end_line' for entries (for Python).
Diffstat (limited to 'journal.cc')
-rw-r--r--journal.cc8
1 files changed, 7 insertions, 1 deletions
diff --git a/journal.cc b/journal.cc
index 70dcf177..e43a1115 100644
--- a/journal.cc
+++ b/journal.cc
@@ -175,8 +175,9 @@ bool entry_base_t::finalize()
balance += amt;
}
+ break;
}
- break;
+ // fall through...
case value_t::AMOUNT:
(*x)->amount = *((amount_t *) balance.data);
@@ -767,6 +768,9 @@ void export_journal()
.add_property("master",
make_getter(&journal_t::master,
return_internal_reference<1>()))
+ .add_property("basket",
+ make_getter(&journal_t::basket,
+ return_internal_reference<1>()))
.def_readwrite("price_db", &journal_t::price_db)
.def_readonly("sources", &journal_t::sources)
@@ -796,7 +800,9 @@ void export_journal()
.def_readonly("journal", &entry_base_t::journal)
.def_readonly("src_idx", &entry_base_t::src_idx)
.def_readonly("beg_pos", &entry_base_t::beg_pos)
+ .def_readonly("beg_line", &entry_base_t::beg_line)
.def_readonly("end_pos", &entry_base_t::end_pos)
+ .def_readonly("end_line", &entry_base_t::end_line)
.def("add_transaction", py_add_transaction)
.def("remove_transaction", &entry_base_t::remove_transaction)