diff options
author | John Wiegley <johnw@newartisans.com> | 2009-11-07 08:32:59 -0500 |
---|---|---|
committer | John Wiegley <johnw@newartisans.com> | 2009-11-07 08:36:24 -0500 |
commit | 98bf53eabccb2a736f62b44a06ee69faf356fdef (patch) | |
tree | 1c68af82428bc8dc6dce5ffc751032a2f4020b20 /src/py_journal.cc | |
parent | c8641a6de65670b8833992c94c51a586a6434a74 (diff) | |
download | fork-ledger-98bf53eabccb2a736f62b44a06ee69faf356fdef.tar.gz fork-ledger-98bf53eabccb2a736f62b44a06ee69faf356fdef.tar.bz2 fork-ledger-98bf53eabccb2a736f62b44a06ee69faf356fdef.zip |
Expose journal_t::read to Python
Diffstat (limited to 'src/py_journal.cc')
-rw-r--r-- | src/py_journal.cc | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/py_journal.cc b/src/py_journal.cc index 3b78e556..17c42c21 100644 --- a/src/py_journal.cc +++ b/src/py_journal.cc @@ -166,6 +166,11 @@ namespace { journal.xact_finalize_hooks.run_hooks(xact, post); } + std::size_t py_read(journal_t& journal, const string& pathname) + { + return journal.read(pathname); + } + } // unnamed namespace void export_journal() @@ -236,6 +241,8 @@ void export_journal() .def("sources", range<return_internal_reference<> > (&journal_t::sources_begin, &journal_t::sources_end)) + .def("read", py_read) + .def("clear_xdata", &journal_t::clear_xdata) .def("valid", &journal_t::valid) |