summaryrefslogtreecommitdiff
path: root/src/pyinterp.cc
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2007-04-30 08:24:37 +0000
committerJohn Wiegley <johnw@newartisans.com>2008-04-13 03:38:34 -0400
commit3ba6c2572dfc58bcd963cbc8cac1cce2f5b01dba (patch)
treedc04c7feaeab4ce255f4f74d47325f4efb9f8314 /src/pyinterp.cc
parent83fc097062c3380091556c6a4b703d28821d5464 (diff)
downloadfork-ledger-3ba6c2572dfc58bcd963cbc8cac1cce2f5b01dba.tar.gz
fork-ledger-3ba6c2572dfc58bcd963cbc8cac1cce2f5b01dba.tar.bz2
fork-ledger-3ba6c2572dfc58bcd963cbc8cac1cce2f5b01dba.zip
Changed some of the logging macro names.
Diffstat (limited to 'src/pyinterp.cc')
-rw-r--r--src/pyinterp.cc9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/pyinterp.cc b/src/pyinterp.cc
index b0cb166c..a08ec820 100644
--- a/src/pyinterp.cc
+++ b/src/pyinterp.cc
@@ -1,10 +1,14 @@
#include "pyinterp.h"
+#include <boost/python/module_init.hpp>
+#include <boost/python/exception_translator.hpp>
+
namespace ledger {
struct python_run
{
object result;
+
python_run(python_interpreter_t * intepreter,
const string& str, int input_mode)
: result(handle<>(borrowed(PyRun_String(str.c_str(), input_mode,
@@ -23,7 +27,7 @@ python_interpreter_t::python_interpreter_t(xml::xpath_t::scope_t * parent)
nspace(handle<>(borrowed(PyModule_GetDict(mmodule.get()))))
{
Py_Initialize();
- detail::init_module("ledger", &initialize_for_python);
+ boost::python::detail::init_module("ledger", &initialize_for_python);
}
object python_interpreter_t::import(const string& str)
@@ -121,7 +125,8 @@ void python_interpreter_t::functor_t::operator()(value_t& result,
arglist.append(*i);
if (PyObject * val =
- PyObject_CallObject(func.ptr(), tuple(arglist).ptr())) {
+ PyObject_CallObject(func.ptr(),
+ boost::python::tuple(arglist).ptr())) {
result = extract<value_t>(val)();
Py_DECREF(val);
}