summaryrefslogtreecommitdiff
path: root/src/pyinterp.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/pyinterp.cc')
-rw-r--r--src/pyinterp.cc14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/pyinterp.cc b/src/pyinterp.cc
index e96646dc..861f822a 100644
--- a/src/pyinterp.cc
+++ b/src/pyinterp.cc
@@ -86,7 +86,7 @@ struct python_run
}
};
-python_interpreter_t::python_interpreter_t(xml::xpath_t::scope_t * parent)
+python_interpreter_t::python_interpreter_t(xml::xpath_t::scope_t& parent)
: xml::xpath_t::scope_t(parent),
mmodule(borrowed(PyImport_AddModule("__main__"))),
nspace(handle<>(borrowed(PyModule_GetDict(mmodule.get()))))
@@ -176,15 +176,15 @@ object python_interpreter_t::eval(const string& str, py_eval_mode_t mode)
return object();
}
-value_t python_interpreter_t::functor_t::operator()(xml::xpath_t::scope_t * locals)
+value_t python_interpreter_t::functor_t::operator()(xml::xpath_t::scope_t& locals)
{
try {
if (! PyCallable_Check(func.ptr())) {
return extract<value_t>(func.ptr());
} else {
- if (locals->args.size() > 0) {
+ if (locals.args.size() > 0) {
list arglist;
- foreach (const value_t& value, locals->args)
+ foreach (const value_t& value, locals.args)
arglist.append(value);
if (PyObject * val =
@@ -215,11 +215,11 @@ value_t python_interpreter_t::functor_t::operator()(xml::xpath_t::scope_t * loca
}
value_t python_interpreter_t::lambda_t::operator()
- (xml::xpath_t::scope_t * locals)
+ (xml::xpath_t::scope_t& locals)
{
try {
- assert(locals->args.size() == 1);
- value_t item = locals->args[0];
+ assert(locals.args.size() == 1);
+ value_t item = locals.args[0];
assert(item.is_xml_node());
return call<value_t>(func.ptr(), item.as_xml_node());
}