diff options
Diffstat (limited to 'py_eval.h')
-rw-r--r-- | py_eval.h | 12 |
1 files changed, 6 insertions, 6 deletions
@@ -29,7 +29,7 @@ class python_interpreter_t : public xml::xpath_t::scope_t Py_Finalize(); } - object import(const std::string& name); + object import(const string& name); enum py_eval_mode_t { PY_EVAL_EXPR, @@ -38,9 +38,9 @@ class python_interpreter_t : public xml::xpath_t::scope_t }; object eval(std::istream& in, py_eval_mode_t mode = PY_EVAL_EXPR); - object eval(const std::string& str, py_eval_mode_t mode = PY_EVAL_EXPR); + object eval(const string& str, py_eval_mode_t mode = PY_EVAL_EXPR); object eval(const char * c_str, py_eval_mode_t mode = PY_EVAL_EXPR) { - std::string str(c_str); + string str(c_str); return eval(str, mode); } @@ -48,18 +48,18 @@ class python_interpreter_t : public xml::xpath_t::scope_t protected: object func; public: - functor_t(const std::string& name, object _func) + functor_t(const string& name, object _func) : xml::xpath_t::functor_t(name), func(_func) {} virtual void operator()(value_t& result, xml::xpath_t::scope_t * locals); }; - virtual void define(const std::string& name, xml::xpath_t::op_t * def) { + virtual void define(const string& name, xml::xpath_t::op_t * def) { // Pass any definitions up to our parent parent->define(name, def); } - virtual xml::xpath_t::op_t * lookup(const std::string& name) { + virtual xml::xpath_t::op_t * lookup(const string& name) { object func = eval(name); if (! func) return parent ? parent->lookup(name) : NULL; |