Move a Py_DECREF call into a more balanced place.

This commit is contained in:
Alistair Riddoch 2009-06-30 20:33:48 +01:00
parent 0d9c50d4c5
commit dbdec38dfa
3 changed files with 23 additions and 7 deletions

View file

@ -388,7 +388,6 @@ PyObject * Create_PyScript(PyObject * wrapper, PyObject * py_class)
PyErr_Print();
}
}
Py_DECREF(wrapper);
return pyob;
}
@ -405,6 +404,8 @@ void Create_PyMind(BaseMind * mind, const std::string & package,
if (o != NULL) {
mind->setScript(new PythonEntityScript(o, (PyObject *)wrapper));
}
Py_DECREF(wrapper);
}
static PyObject * is_location(PyObject * self, PyObject * loc)