diff options
author | John Wiegley <johnw@newartisans.com> | 2007-05-16 05:38:32 +0000 |
---|---|---|
committer | John Wiegley <johnw@newartisans.com> | 2008-04-13 03:38:52 -0400 |
commit | 7c7e5c5e367778c6d54a1bb2be2db5c73db0492b (patch) | |
tree | 16ed5bde7719aa10b4d7cde25eaaf2ea64fa7f80 /src/pyinterp.cc | |
parent | 74ecceb2ba0cb1592f570bcb52619f882c15bd27 (diff) | |
download | fork-ledger-7c7e5c5e367778c6d54a1bb2be2db5c73db0492b.tar.gz fork-ledger-7c7e5c5e367778c6d54a1bb2be2db5c73db0492b.tar.bz2 fork-ledger-7c7e5c5e367778c6d54a1bb2be2db5c73db0492b.zip |
Now using xpath_t::path_t to select nodes.
Diffstat (limited to 'src/pyinterp.cc')
-rw-r--r-- | src/pyinterp.cc | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/pyinterp.cc b/src/pyinterp.cc index cd0576bf..e96646dc 100644 --- a/src/pyinterp.cc +++ b/src/pyinterp.cc @@ -119,6 +119,7 @@ object python_interpreter_t::import(const string& str) PyErr_Print(); throw_(std::logic_error, "Importing Python module " << str); } + return object(); } object python_interpreter_t::eval(std::istream& in, py_eval_mode_t mode) @@ -153,6 +154,7 @@ object python_interpreter_t::eval(std::istream& in, py_eval_mode_t mode) PyErr_Print(); throw_(std::logic_error, "Evaluating Python code"); } + return object(); } object python_interpreter_t::eval(const string& str, py_eval_mode_t mode) @@ -171,6 +173,7 @@ object python_interpreter_t::eval(const string& str, py_eval_mode_t mode) PyErr_Print(); throw_(std::logic_error, "Evaluating Python code"); } + return object(); } value_t python_interpreter_t::functor_t::operator()(xml::xpath_t::scope_t * locals) @@ -194,7 +197,7 @@ value_t python_interpreter_t::functor_t::operator()(xml::xpath_t::scope_t * loca else if (PyObject * err = PyErr_Occurred()) { PyErr_Print(); throw_(xml::xpath_t::calc_error, - "While calling Python function '" /*<< name() <<*/ "'"); + "While calling Python function '" /*<< name() <<*/ "': " << err); } else { assert(false); } @@ -208,6 +211,7 @@ value_t python_interpreter_t::functor_t::operator()(xml::xpath_t::scope_t * loca throw_(xml::xpath_t::calc_error, "While calling Python function '" /*<< name() <<*/ "'"); } + return NULL_VALUE; } value_t python_interpreter_t::lambda_t::operator() @@ -216,7 +220,7 @@ value_t python_interpreter_t::lambda_t::operator() try { assert(locals->args.size() == 1); value_t item = locals->args[0]; - assert(item.is_type(value_t::XML_NODE)); + assert(item.is_xml_node()); return call<value_t>(func.ptr(), item.as_xml_node()); } catch (const error_already_set&) { @@ -224,6 +228,7 @@ value_t python_interpreter_t::lambda_t::operator() throw_(xml::xpath_t::calc_error, "While evaluating Python lambda expression"); } + return NULL_VALUE; } } // namespace ledger |