[PyQt] Possible SIP bug

Phil Thompson phil at riverbankcomputing.com
Sat Jun 13 19:06:28 BST 2009

On Sat, 13 Jun 2009 19:46:07 +0200, Arve Knudsen <arve.knudsen at gmail.com>
> Sorry to bother you again, Phil :) I think I may have stumbled onto
> SIP bug, however, as I got a crash in a debug-built Python 2.6, due to a
> negative reference count for my extension module. According to the Python
> documentation, objects returned from Py_InitModule are borrowed, so one
> should increment their reference count. So I patched sip to do just that,
> and the problem went away.

You don't need to take a reference. However Py_DECREFs in the error
handling code are all wrong (they should only be done for Python v3). Are
any of the error paths being executed in your case?


More information about the PyQt mailing list