diff options
Diffstat (limited to 'common/pybindings.h')
-rw-r--r-- | common/pybindings.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/common/pybindings.h b/common/pybindings.h index 44898198..a99ad51b 100644 --- a/common/pybindings.h +++ b/common/pybindings.h @@ -94,7 +94,7 @@ void python_export_global(const char *name, Tn &x) { return; d = PyModule_GetDict(m); try { - PyObject * p = object(boost::ref(x)).ptr(); + PyObject * p = incref(object(boost::ref(x)).ptr()); PyDict_SetItemString(d, name, p); } catch (boost::python::error_already_set const &) { // Parse and output the exception |