summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/pyinterp.cc37
-rw-r--r--src/pyledger.cc43
2 files changed, 37 insertions, 43 deletions
diff --git a/src/pyinterp.cc b/src/pyinterp.cc
index dc070fd1..b687ec05 100644
--- a/src/pyinterp.cc
+++ b/src/pyinterp.cc
@@ -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__"))),
diff --git a/src/pyledger.cc b/src/pyledger.cc
index 4c2cd96e..ebbdc82e 100644
--- a/src/pyledger.cc
+++ b/src/pyledger.cc
@@ -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)