[C++-sig] What's wrong here? (BPL V2)

Dominic Sacré bugcreator at gmx.de
Thu Jun 13 22:24:10 CEST 2002


On Thursday 13 June 2002 17:41, Ralf W. Grosse-Kunstleve wrote:
> David is currently working on the user-level from_python equivalent.
> Until then, here is what I use as a place-holder (haven't tried it
> to extract pointers, though):
>
> #include <boost/python/converter/return_from_python.hpp>
>
>   template <typename U>
>   struct extractor
>   {
>     static
>     U
>     get(PyObject* obj)
>     {
>       Py_INCREF(obj);
>       return converter::return_from_python<U>()(obj);
>     }
>   };

Apparently extracting pointers doesn't work, I got a SIGABRT when I tried 
that...
This extractor works if I can return an object by making a copy of it, but 
what I need is just a pointer, the object is noncopyable.

Any ideas?
I can post the backtrace if that's of any use.

    Dominic







More information about the Cplusplus-sig mailing list