summaryrefslogtreecommitdiff
path: root/python/pyinterp.cc
diff options
context:
space:
mode:
Diffstat (limited to 'python/pyinterp.cc')
-rw-r--r--python/pyinterp.cc16
1 files changed, 6 insertions, 10 deletions
diff --git a/python/pyinterp.cc b/python/pyinterp.cc
index 07a619fe..831852ad 100644
--- a/python/pyinterp.cc
+++ b/python/pyinterp.cc
@@ -177,8 +177,7 @@ object python_interpreter_t::eval(const string& str, py_eval_mode_t mode)
return object();
}
-value_t python_interpreter_t::functor_t::operator()
- (expr_t::call_scope_t& args)
+value_t python_interpreter_t::functor_t::operator()(call_scope_t& args)
{
try {
if (! PyCallable_Check(func.ptr())) {
@@ -201,7 +200,7 @@ value_t python_interpreter_t::functor_t::operator()
}
else if (PyObject * err = PyErr_Occurred()) {
PyErr_Print();
- throw_(expr_t::calc_error,
+ throw_(calc_error,
"While calling Python function '" /*<< name() <<*/ "': " << err);
} else {
assert(false);
@@ -213,25 +212,22 @@ value_t python_interpreter_t::functor_t::operator()
}
catch (const error_already_set&) {
PyErr_Print();
- throw_(expr_t::calc_error,
+ throw_(calc_error,
"While calling Python function '" /*<< name() <<*/ "'");
}
return NULL_VALUE;
}
-value_t python_interpreter_t::lambda_t::operator()
- (expr_t::call_scope_t& args)
+value_t python_interpreter_t::lambda_t::operator()(call_scope_t& args)
{
try {
assert(args.size() == 1);
value_t item = args[0];
- assert(item.is_xml_node());
- return call<value_t>(func.ptr(), item.as_xml_node());
+ return call<value_t>(func.ptr(), item);
}
catch (const error_already_set&) {
PyErr_Print();
- throw_(expr_t::calc_error,
- "While evaluating Python lambda expression");
+ throw_(calc_error, "While evaluating Python lambda expression");
}
return NULL_VALUE;
}