[C++-sig] current spelling of from_python<>?

David Abrahams david.abrahams at rcn.com
Tue Jun 11 19:53:06 CEST 2002


From: "Ralf W. Grosse-Kunstleve" <rwgk at yahoo.com>


> Until about a week ago the code below worked as a placeholder
> for a user-level from_python<> converter:
> 
>   template <typename U>
>   struct extractor
>   {
>     static
>     U
>     get(PyObject* obj)
>     {
>       Py_INCREF(obj);
>       return converter::callback_from_python<U>()(obj);
>     }
>   };
> 
> converter::callback_from_python<> is defined in the obsolete file
> converter/callback.hpp. What should I be using instead?

    converter::return_from_python<> in converter/return_from_python.hpp

also see

    converter::arg_to_python<> in converter/arg_to_python.hpp

-Dave






More information about the Cplusplus-sig mailing list