From b0e66d441cf584e7e48049d4f07afcc8e743309a Mon Sep 17 00:00:00 2001 From: David Shah Date: Thu, 7 Jun 2018 12:57:52 +0200 Subject: Global design object working Signed-off-by: David Shah --- common/pybindings.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'common/pybindings.h') 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 -- cgit v1.2.3