aboutsummaryrefslogtreecommitdiffstats
path: root/common
diff options
context:
space:
mode:
Diffstat (limited to 'common')
-rw-r--r--common/pybindings.cc1
-rw-r--r--common/pywrappers.h4
2 files changed, 3 insertions, 2 deletions
diff --git a/common/pybindings.cc b/common/pybindings.cc
index e9ceca51..329bcf1e 100644
--- a/common/pybindings.cc
+++ b/common/pybindings.cc
@@ -123,7 +123,6 @@ BOOST_PYTHON_MODULE(MODULE_NAME)
.def(self == self);
arch_wrap_python();
- class_<Context, Context *, bases<Arch>, boost::noncopyable>("Context", no_init).def("checksum", &Context::checksum);
}
static wchar_t *program;
diff --git a/common/pywrappers.h b/common/pywrappers.h
index fe786a3b..5b0146ac 100644
--- a/common/pywrappers.h
+++ b/common/pywrappers.h
@@ -122,7 +122,9 @@ template <typename Class, typename FuncT, FuncT fn, typename rv_conv, typename a
static conv_result_type wrapped_fn(class_type &cls, conv_arg1_type arg1)
{
- return rv_conv()(get_base(cls).ctx, get_base(cls).*fn(arg1_conv()(get_ctx(cls), arg1)));
+ Context *ctx = get_ctx<Class>(cls);
+ Class &base = get_base<Class>(cls);
+ return rv_conv()(ctx, (base.*fn)(arg1_conv()(ctx, arg1)));
}
template <typename WrapCls> static void def_wrap(WrapCls cls_, const char *name) { cls_.def(name, wrapped_fn); }