diff options
author | John Wiegley <johnw@newartisans.com> | 2008-07-29 05:10:16 -0400 |
---|---|---|
committer | John Wiegley <johnw@newartisans.com> | 2008-07-29 05:59:38 -0400 |
commit | 4518ea95408e2d5fe90a87159b88bb41734ec1dc (patch) | |
tree | 3026169803aaea580d8b452cb9bb8a569c92fb2a /pyinterp.cc | |
parent | 63039ade9209bced70b3e4dbb673ad90286d310a (diff) | |
download | fork-ledger-4518ea95408e2d5fe90a87159b88bb41734ec1dc.tar.gz fork-ledger-4518ea95408e2d5fe90a87159b88bb41734ec1dc.tar.bz2 fork-ledger-4518ea95408e2d5fe90a87159b88bb41734ec1dc.zip |
Value expression architecture is now rewritten, but the functionality of the
old system (for example, the meaning of 'a') has yet to be restored. In the
new scheme, this will be done by definition a function outside of the value
expression logic, rather than the tight coupling between journal innards and
value expressions that occurred in 2.x.
Diffstat (limited to 'pyinterp.cc')
-rw-r--r-- | pyinterp.cc | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/pyinterp.cc b/pyinterp.cc index 85d2a422..d702f291 100644 --- a/pyinterp.cc +++ b/pyinterp.cc @@ -86,12 +86,12 @@ struct python_run } }; -python_interpreter_t::python_interpreter_t(expr::scope_t& parent) - : expr::symbol_scope_t(parent), +python_interpreter_t::python_interpreter_t(expr_t::scope_t& parent) + : expr_t::symbol_scope_t(parent), mmodule(borrowed(PyImport_AddModule("__main__"))), nspace(handle<>(borrowed(PyModule_GetDict(mmodule.get())))) { - TRACE_CTOR(python_interpreter_t, "expr::scope_t&"); + TRACE_CTOR(python_interpreter_t, "expr_t::scope_t&"); Py_Initialize(); boost::python::detail::init_module("ledger", &initialize_for_python); @@ -179,7 +179,7 @@ object python_interpreter_t::eval(const string& str, py_eval_mode_t mode) } value_t python_interpreter_t::functor_t::operator() - (expr::call_scope_t& args) + (expr_t::call_scope_t& args) { try { if (! PyCallable_Check(func.ptr())) { @@ -202,7 +202,7 @@ value_t python_interpreter_t::functor_t::operator() } else if (PyObject * err = PyErr_Occurred()) { PyErr_Print(); - throw_(expr::calc_error, + throw_(expr_t::calc_error, "While calling Python function '" /*<< name() <<*/ "': " << err); } else { assert(false); @@ -214,14 +214,14 @@ value_t python_interpreter_t::functor_t::operator() } catch (const error_already_set&) { PyErr_Print(); - throw_(expr::calc_error, + throw_(expr_t::calc_error, "While calling Python function '" /*<< name() <<*/ "'"); } return NULL_VALUE; } value_t python_interpreter_t::lambda_t::operator() - (expr::call_scope_t& args) + (expr_t::call_scope_t& args) { try { assert(args.size() == 1); @@ -231,7 +231,7 @@ value_t python_interpreter_t::lambda_t::operator() } catch (const error_already_set&) { PyErr_Print(); - throw_(expr::calc_error, + throw_(expr_t::calc_error, "While evaluating Python lambda expression"); } return NULL_VALUE; |