[C++-sig] shared_ptr converters

Nicodemus nicodemus at globalite.com.br
Wed Apr 16 23:15:45 CEST 2003


David Abrahams wrote:

>In the meantime, you can do this horrible thing:
>
>    objects::class_value_wrapper<
>        shared_ptr<A>
>      , objects::make_ptr_instance<A, objects::pointer_holder<shared_ptr<A>,A> >
>    >();
>        
>Which will register a to_python converter for shared_ptr<A>.
>

Hmm, no problem. Thanks for the help!

I will make Pyste generate this code instead of the usual "class_<X, 
boost::shared_ptr<X> >", at least until the necessary changes in 
Boost.Python are made. 8)

Thanks again,
Nicodemus.






More information about the Cplusplus-sig mailing list