Boost logo

Boost :

From: Trevor Perrin (tperrin_at_[hidden])
Date: 2001-07-07 22:22:32


An uninformed question by a Boost.Python newbie:

I've previously created a modified boost::smart_ptr for myself, and moved it
into a 'boostold' namespace. Now I'd like to use at least
boostold::shared_ptr with Boost.Python. As a first stab I duplicated the
bottom 4 converter member functions in
extension_class.hpp/python_extension_class_converters, which refer to
'boost::shared_ptr', and changed 'boost::shared_ptr' to
'boostold::shared_ptr'.

Which seems to work (I'm using vc6sp4; also I don't care about
cross-extension-module dependencies right now), but I'm wondering if there's
a cleaner way to insert these converters into boost.python than modifying
its code. I'm also quite confused by the shared_ptr converter code within
conversions.hpp; what is "wrapped_pointer", for example? Is the
"MUST_SUPPORT_MSVC" code in the comments an idiom I should be using?

Trevor


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk