[C++-sig] wrapper & HeldType

David Abrahams dave at boost-consulting.com
Wed Oct 19 20:10:19 CEST 2005


Roman Yakovenko <roman.yakovenko at gmail.com> writes:

> On 10/19/05, David Abrahams <dave at boost-consulting.com> wrote:
>> What I'm asking is that you show some code that doesn't work, but that
>> you think ought to work, if the interface were better.
>
> Do you mean under "doesn't work" - does not compile. If so I am
> resending my example,
> fixed to show my point. Now file contains code that I think I should
> write in order
> to export class with virtual methods and non default held type.
>
> If you mean "doesn't work" as run time error then such thing does not exists.
> The code I wrote in previous post works as expected.

The enclosed patch to boost/python/object/class_metadata.hpp seems to
do the trick.  However, you'll have to stop using
register_ptr_to_python<std::auto_ptr<data> > ;-)

-------------- next part --------------
A non-text attachment was scrubbed...
Name: class_metadata.patch
Type: text/x-patch
Size: 1157 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/cplusplus-sig/attachments/20051019/2f2a7d79/attachment.bin>
-------------- next part --------------


-- 
Dave Abrahams
Boost Consulting
www.boost-consulting.com


More information about the Cplusplus-sig mailing list