summaryrefslogtreecommitdiff
path: root/src/pyinterp.h
diff options
context:
space:
mode:
authorAlexis Hildebrandt <afh@surryhill.net>2023-04-12 20:33:40 +0200
committerAlexis Hildebrandt <afh@surryhill.net>2023-04-12 21:53:11 +0200
commit9244a27f9548a1d39fb01348fde66ff81f5150a4 (patch)
tree0f9d06a762a9a9939e1f37be60cf2b5e47da7983 /src/pyinterp.h
parent5f78556078d2e61d5c0ef44e36d58f3864cd84d1 (diff)
downloadfork-ledger-9244a27f9548a1d39fb01348fde66ff81f5150a4.tar.gz
fork-ledger-9244a27f9548a1d39fb01348fde66ff81f5150a4.tar.bz2
fork-ledger-9244a27f9548a1d39fb01348fde66ff81f5150a4.zip
Refactor python related types into ledger::python namespace
Diffstat (limited to 'src/pyinterp.h')
-rw-r--r--src/pyinterp.h24
1 files changed, 12 insertions, 12 deletions
diff --git a/src/pyinterp.h b/src/pyinterp.h
index 57fb176b..45bb7adb 100644
--- a/src/pyinterp.h
+++ b/src/pyinterp.h
@@ -52,19 +52,19 @@ namespace ledger {
class python_module_t : public scope_t, public noncopyable
{
public:
- string module_name;
- python::object module_object;
- python::dict module_globals;
+ string module_name;
+ boost::python::object module_object;
+ boost::python::dict module_globals;
explicit python_module_t(const string& name);
- explicit python_module_t(const string& name, python::object obj);
+ explicit python_module_t(const string& name, boost::python::object obj);
void import_module(const string& name, bool import_direct = false);
virtual expr_t::ptr_op_t lookup(const symbol_t::kind_t kind,
const string& name);
- void define_global(const string& name, python::object obj) {
+ void define_global(const string& name, boost::python::object obj) {
module_globals[name] = obj;
}
@@ -102,7 +102,7 @@ public:
void initialize();
void hack_system_paths();
- python::object import_option(const string& name);
+ boost::python::object import_option(const string& name);
enum py_eval_mode_t {
PY_EVAL_EXPR,
@@ -110,9 +110,9 @@ public:
PY_EVAL_MULTI
};
- python::object eval(std::istream& in, py_eval_mode_t mode = PY_EVAL_EXPR);
- python::object eval(const string& str, py_eval_mode_t mode = PY_EVAL_EXPR);
- python::object eval(const char * c_str, py_eval_mode_t mode = PY_EVAL_EXPR) {
+ boost::python::object eval(std::istream& in, py_eval_mode_t mode = PY_EVAL_EXPR);
+ boost::python::object eval(const string& str, py_eval_mode_t mode = PY_EVAL_EXPR);
+ boost::python::object eval(const char * c_str, py_eval_mode_t mode = PY_EVAL_EXPR) {
return eval(string(c_str), mode);
}
@@ -122,14 +122,14 @@ public:
functor_t();
protected:
- python::object func;
+ boost::python::object func;
public:
string name;
- functor_t(python::object _func, const string& _name)
+ functor_t(boost::python::object _func, const string& _name)
: func(_func), name(_name) {
- TRACE_CTOR(functor_t, "python::object, const string&");
+ TRACE_CTOR(functor_t, "boost::python::object, const string&");
}
functor_t(const functor_t& other)
: func(other.func), name(other.name) {