Opened 16 years ago
Closed 16 years ago
#728 closed Patches (Fixed)
opaque_pointer bug fix + enhancement
Reported by: | ganssauge | Owned by: | david_abrahams |
---|---|---|---|
Milestone: | Component: | None | |
Version: | None | Severity: | |
Keywords: | Cc: |
Description
After debugging a crash 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. The attached patch corrects this behaviour by initialising the type object using PyType_Ready(). Furthermore I implemented cross module support in so far as the converter registers itself only if not another module already has registered the same converter before. The opaque test case has been update to check for the segmentation fault mentioned in my previous post. A test case for the cross module support is included (crossmod_opaque). I also updated the documentation for opaque. I tested my patch with - GCC-4.1 running on GNU/Linux 2.6.16.21-0.13-default x86_64 - Visual-C++-6.5 running on Windows XP - Visual-C++-7.1 running on Windows XP The patch is applied by calling patch -p1 < opaque_patch in the root of the boost hierarchy. Files patched are: boost_head/boost/python/opaque_pointer_converter.hpp boost_head/libs/python/doc/v2/opaque.html boost_head/libs/python/doc/v2/opaque_pointer_converter.html boost_head/libs/python/doc/v2/reference.html boost_head/libs/python/doc/v2/return_opaque_pointer.html boost_head.orig/libs/python/test/crossmod_opaque_a.cpp boost_head/libs/python/test/crossmod_opaque_a.cpp boost_head/libs/python/test/crossmod_opaque_b.cpp boost_head/libs/python/test/crossmod_opaque.py boost_head/libs/python/test/Jamfile boost_head/libs/python/test/Jamfile.v2 boost_head/libs/python/test/opaque.py
Note:
See TracTickets
for help on using tickets.