Merge pull request #511 from kylef/kylef/register_account

Expose journal_t::register_account to Python
This commit is contained in:
John Wiegley 2018-01-23 00:36:24 -08:00 committed by GitHub
commit b3b72cbea2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -135,6 +135,11 @@ namespace {
return journal.find_account(name, auto_create);
}
account_t * py_register_account(journal_t& journal, const string& name, post_t* post)
{
return journal.register_account(name, post, journal.master);
}
#if 0
std::size_t py_read(journal_t& journal, const string& pathname)
{
@ -286,6 +291,10 @@ void export_journal()
return_internal_reference<1,
with_custodian_and_ward_postcall<1, 0> >())
.def("register_account", py_register_account,
return_internal_reference<1,
with_custodian_and_ward_postcall<1, 0> >())
.def("expand_aliases", &journal_t::expand_aliases,
return_internal_reference<1,
with_custodian_and_ward_postcall<1, 0> >())