[C++-sig] boost.python extract and smart-pointer

Baptiste Lepilleur gaiacrtn at free.fr
Mon Aug 23 09:52:41 CEST 2004


    I'm running in some trouble with extract during unpickling of null
smart-pointer. I have registered a intrusive_ptr based smart-pointer which
works greatly.

    During pickling, my null smart-pointer converted into None. During
unpickling, when I use extract<MyPtrType> on a null smart-pointer I get a
conversion error saying that there is no conversion from NoneType to
MyPtrType.

    Is this a known issue, or did I miss something ?

    As a work-around I tried to test if tuple[1] was None, but couldn't
figure out how to do that in C++. Any tips ?

    Baptiste.




More information about the Cplusplus-sig mailing list