Fix segfault on exit

This commit is contained in:
Siu Kwan Lam 2013-02-08 18:13:16 -06:00
commit 8700bbc4f1

View file

@ -57,6 +57,7 @@ create_python_submodule(PyObject* parent, const char* name,
if (-1 == PyModule_AddObject(parent, name, submod)) {
return NULL;
}
Py_INCREF(submod); // otherwise, it would segfault on exit
return submod;
}