[C++-sig] wrapper class (was: Re: BPL and Py_Clear())

Niall Douglas s_sourceforge at nedprod.com
Tue Jun 21 01:45:33 CEST 2005


On 16 Jun 2005 at 22:57, David Abrahams wrote:

> >> > Because if my C++ is going through a BPL wrapped virtual function
> >> > and is passing it an array of unsigned int, if python doesn't
> >> > overload it then it goes C++=>Python=>C++ and no extra action is
> >> > required.
> >> 
> >> Not if you use the new-style polymorphism support.
> >
> > Is there a special doc page or wiki entry describing this? It has
> > been added when I wasn't paying attention to this mailing list.
> 
> http://tinyurl.com/8gynk#python.class_virtual_functions
> (http://www.boost.org/libs/python/doc/tutorial/doc/html/python/exposin
> g.html#python.class_virtual_functions)
> 
> http://tinyurl.com/aknmp
> (http://www.boost.org/libs/python/doc/v2/wrapper.html)
> 
> This is the recommended approach; it performs better and has fewer
> problems in almost every way than the old one. -- Dave Abrahams Boost
> Consulting www.boost-consulting.com

None of those docs told me why the new way was any better than the 
old way. I did however find this message:

http://mail.python.org/pipermail/c++-sig/2004-July/007826.html

Now plus or minus a few items, this is what I was looking for. It's 
rather a shame this isn't in the docs, but it's far more of a shame 
that pyste generates old code here as like I'm sure many people, I 
used pyste to teach me how to write in BPL.

I'd imagine pyste could be patched easily enough. I've added it to my 
todo list for the v0.86 release of TnFOX. As before, I'll submit the 
new version here.

Cheers,
Niall






More information about the Cplusplus-sig mailing list