[C++-sig] Re: boost::python segfault related to extract

David Abrahams dave at boost-consulting.com
Wed Oct 6 23:32:15 CEST 2004


"Neal D. Becker" <ndbecker2 at verizon.net> writes:

>   // Given a target type and a SlotPolicy describing how to perform a
>   // given conversion, registers from_python converters which use the
>   // SlotPolicy to extract the type.
>   template <class T, class SlotPolicy>
>   struct slot_rvalue_from_python
>   {
> [...]
>
>           // record successful construction
>           data->convertible = storage; <<< here
>
>
> which calls:
> template <class T>
> inline handle<T>::~handle()
> {
>     python::xdecref(m_p);  <<< here
> }

This makes no sense.  data->convertible is a raw pointer.  Assigning
into it doesn't call anything.

-- 
Dave Abrahams
Boost Consulting
http://www.boost-consulting.com




More information about the Cplusplus-sig mailing list