Expose journal_t::read to Python

This commit is contained in:
John Wiegley 2009-11-07 08:32:59 -05:00
parent c8641a6de6
commit 98bf53eabc

View file

@ -166,6 +166,11 @@ namespace {
journal.xact_finalize_hooks.run_hooks(xact, post); 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 } // unnamed namespace
void export_journal() void export_journal()
@ -236,6 +241,8 @@ void export_journal()
.def("sources", range<return_internal_reference<> > .def("sources", range<return_internal_reference<> >
(&journal_t::sources_begin, &journal_t::sources_end)) (&journal_t::sources_begin, &journal_t::sources_end))
.def("read", py_read)
.def("clear_xdata", &journal_t::clear_xdata) .def("clear_xdata", &journal_t::clear_xdata)
.def("valid", &journal_t::valid) .def("valid", &journal_t::valid)