[C++-sig] Bug in opaque_pointer_converter and patch

Ganssauge, Gottfried Gottfried.Ganssauge at haufe.de
Fri Sep 8 13:50:44 CEST 2006


While debugging a python extension I found out that a segmentation fault
was produced by the python statement
	print type(some_opaque_pointer)

After some further debugging I found out that all instances created from
opaque_pointer_converter had a type object which itself didn't have a
type, and this finally lead to the crash.

Find attached a patch which corrects this behaviour by initialising the
type object using PyType_Ready().

Cheers,

Gottfried 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: type_ready.patch
Type: application/octet-stream
Size: 850 bytes
Desc: type_ready.patch
URL: <http://mail.python.org/pipermail/cplusplus-sig/attachments/20060908/64f68afd/attachment.obj>


More information about the Cplusplus-sig mailing list