Correcting pyledger initialization...
This commit is contained in:
parent
80c04e638f
commit
7ba3f73018
2 changed files with 37 additions and 43 deletions
|
|
@ -37,6 +37,41 @@ namespace ledger {
|
|||
|
||||
using namespace boost::python;
|
||||
|
||||
void export_utils();
|
||||
void export_times();
|
||||
void export_amount();
|
||||
void export_commodity();
|
||||
#if 0
|
||||
void export_balance();
|
||||
void export_value();
|
||||
void export_journal();
|
||||
void export_parser();
|
||||
void export_option();
|
||||
void export_walk();
|
||||
void export_report();
|
||||
void export_format();
|
||||
void export_valexpr();
|
||||
#endif
|
||||
|
||||
void initialize_for_python()
|
||||
{
|
||||
export_utils();
|
||||
export_times();
|
||||
export_amount();
|
||||
export_commodity();
|
||||
#if 0
|
||||
export_balance();
|
||||
export_value();
|
||||
export_journal();
|
||||
export_parser();
|
||||
export_option();
|
||||
export_walk();
|
||||
export_format();
|
||||
export_report();
|
||||
export_valexpr();
|
||||
#endif
|
||||
}
|
||||
|
||||
struct python_run
|
||||
{
|
||||
object result;
|
||||
|
|
@ -51,8 +86,6 @@ struct python_run
|
|||
}
|
||||
};
|
||||
|
||||
extern void initialize_for_python();
|
||||
|
||||
python_interpreter_t::python_interpreter_t(xml::xpath_t::scope_t * parent)
|
||||
: xml::xpath_t::scope_t(parent),
|
||||
mmodule(borrowed(PyImport_AddModule("__main__"))),
|
||||
|
|
|
|||
|
|
@ -33,49 +33,10 @@
|
|||
|
||||
using namespace boost::python;
|
||||
|
||||
namespace ledger {
|
||||
|
||||
void export_utils();
|
||||
void export_times();
|
||||
void export_amount();
|
||||
void export_commodity();
|
||||
#if 0
|
||||
void export_balance();
|
||||
void export_value();
|
||||
void export_journal();
|
||||
void export_parser();
|
||||
void export_option();
|
||||
void export_walk();
|
||||
void export_report();
|
||||
void export_format();
|
||||
void export_valexpr();
|
||||
#endif
|
||||
|
||||
void initialize_for_python()
|
||||
{
|
||||
export_utils();
|
||||
export_times();
|
||||
export_amount();
|
||||
export_commodity();
|
||||
#if 0
|
||||
export_balance();
|
||||
export_value();
|
||||
export_journal();
|
||||
export_parser();
|
||||
export_option();
|
||||
export_walk();
|
||||
export_format();
|
||||
export_report();
|
||||
export_valexpr();
|
||||
#endif
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
ledger::session_t python_session;
|
||||
|
||||
void hello() {
|
||||
std::cout << "Hello, world!" << std::endl;
|
||||
namespace ledger {
|
||||
extern void initialize_for_python();
|
||||
}
|
||||
|
||||
BOOST_PYTHON_MODULE(ledger)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue