summaryrefslogtreecommitdiff
path: root/python.cc
diff options
context:
space:
mode:
Diffstat (limited to 'python.cc')
-rw-r--r--python.cc10
1 files changed, 10 insertions, 0 deletions
diff --git a/python.cc b/python.cc
index 9f023447..36d80c7c 100644
--- a/python.cc
+++ b/python.cc
@@ -2,6 +2,15 @@
using namespace boost::python;
+#include "ledger.h"
+#include "acconf.h"
+
+static struct cleanup_ledger_t {
+ ~cleanup_ledger_t() {
+ ledger::shutdown();
+ }
+} _cleanup_ledger;
+
void export_amount();
void export_balance();
void export_value();
@@ -26,4 +35,5 @@ BOOST_PYTHON_MODULE(ledger) {
#ifdef READ_GNUCASH
export_gnucash();
#endif
+ ledger::initialize();
}