From 98bf53eabccb2a736f62b44a06ee69faf356fdef Mon Sep 17 00:00:00 2001 From: John Wiegley Date: Sat, 7 Nov 2009 08:32:59 -0500 Subject: Expose journal_t::read to Python --- src/py_journal.cc | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/py_journal.cc') 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 > (&journal_t::sources_begin, &journal_t::sources_end)) + .def("read", py_read) + .def("clear_xdata", &journal_t::clear_xdata) .def("valid", &journal_t::valid) -- cgit v1.2.3