Hegedüs Ervin wrote:
I've put it a Py_INCREF() after every PyModule_AddObject(), eg.:
PyModule_AddObject(o, "error", cibcrypt_error_nokey);
Py_INCREF(cibcrypt_error_nokey);
That looks correct, because PyModule_AddObject is documented as
stealing a reference to the object.
By the way, it probably doesn't make a difference here, but
it's better style to do the Py_INCREF *before* calling
a function that steals a reference, to be sure that the
object can't get spuriously deallocated.
--
Greg
--
http://mail.python.org/mailman/listinfo/python-list