summaryrefslogtreecommitdiff
path: root/src/main.cc
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2009-01-23 01:53:19 -0400
committerJohn Wiegley <johnw@newartisans.com>2009-01-23 01:53:19 -0400
commit617dd0c2613531f559a0206afe9011df73ea1856 (patch)
tree7ade20f5c569e230a31847331faf44a18c73895d /src/main.cc
parent8d4542d199a325f344f96aff94c8ca008f0ab98e (diff)
downloadfork-ledger-617dd0c2613531f559a0206afe9011df73ea1856.tar.gz
fork-ledger-617dd0c2613531f559a0206afe9011df73ea1856.tar.bz2
fork-ledger-617dd0c2613531f559a0206afe9011df73ea1856.zip
When Python support is present, use a session_t object which is derived from
python_interpreter_t, so that Python can provide value expression definitions.
Diffstat (limited to 'src/main.cc')
-rw-r--r--src/main.cc7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/main.cc b/src/main.cc
index a3fa5c18..5f8e7aeb 100644
--- a/src/main.cc
+++ b/src/main.cc
@@ -33,6 +33,9 @@
#include "report.h"
#include "option.h"
#include "help.h"
+#if defined(HAVE_BOOST_PYTHON)
+#include "pyinterp.h"
+#endif
#include "textual.h"
#include "qif.h"
@@ -455,7 +458,11 @@ int main(int argc, char * argv[], char * envp[])
INFO("Ledger starting");
+#if defined(HAVE_BOOST_PYTHON)
+ std::auto_ptr<ledger::session_t> session(new ledger::python_interpreter_t);
+#else
std::auto_ptr<ledger::session_t> session(new ledger::session_t);
+#endif
ledger::set_session_context(session.get());