diff --git a/src/PyClassifier.cc b/src/PyClassifier.cc index f75387e..19dc5d6 100644 --- a/src/PyClassifier.cc +++ b/src/PyClassifier.cc @@ -5,7 +5,7 @@ namespace pywrap { namespace np = boost::python::numpy; PyClassifier::PyClassifier(const std::string& module, const std::string& className) : module(module), className(className), fitted(false) { - id = reinterpret_cast(&this); + id = 0;//reinterpret_cast(&this); pyWrap = PyWrap::GetInstance(); pyWrap->importClass(module, className); } diff --git a/src/PyWrap.cc b/src/PyWrap.cc index 24d7b6c..c6f8ce9 100644 --- a/src/PyWrap.cc +++ b/src/PyWrap.cc @@ -133,7 +133,7 @@ namespace pywrap { } int res = PyObject_SetAttrString(instance, key.c_str(), pValue); if (res == -1 && PyErr_Occurred()) { - cleanDictionary(args); + Py_XDECREF(pValue); errorAbort("Couldn't set attribute " + key + "=" + value.dump()); } Py_XDECREF(pValue);