Re: [C++-sig] boost.python - C++ class overridden in python causes slicing

2009-09-08 Thread Jean-Sébastien Guay
Hi Renato, You can use "boost::python::ptr(your_cpp_cpointer)" this avoid create unecessary copies. Thanks for the tip, boost::ref() for references and boost::python::ptr() for pointers, makes sense. J-S -- __ Jean-Sebastien Guayjean-s

Re: [C++-sig] boost.python - C++ class overridden in python causes slicing

2009-09-08 Thread Renato Araujo
Hi Jean, You can use "boost::python::ptr(your_cpp_cpointer)" this avoid create unecessary copies. BR Renato Araujo Oliveira Filho On Tue, Sep 8, 2009 at 11:41 PM, Jean-Sébastien Guay wrote: > Hi all, > > I found an post from earlier this year to this list where David Abrahams > said: > > ---

Re: [C++-sig] boost.python - C++ class overridden in python causes slicing

2009-09-08 Thread Jean-Sébastien Guay
Hi all, I found an post from earlier this year to this list where David Abrahams said: If you want to pass an object by reference to a python function, you have to wrap it in boost::ref(). Otherwise, it will try to copy the object and the resulting copy will have to be de

Re: [C++-sig] boost.python - C++ class overridden in python causes slicing

2009-09-08 Thread troy d. straszheim
[reply taken offlist] oops, apparently not, apologies. -t ___ Cplusplus-sig mailing list Cplusplus-sig@python.org http://mail.python.org/mailman/listinfo/cplusplus-sig

Re: [C++-sig] boost.python - C++ class overridden in python causes slicing

2009-09-08 Thread troy d. straszheim
Jean-Sébastien Guay wrote: Hi again Troy, I was thinking of setting up a googlecode project for this work, because there is at least one other person who might be interested in working with me on it (Paul Melis). I'll see if I can do that soon. It's done now, here: http://code.google.com/p/

Re: [C++-sig] boost.python - C++ class overridden in python causes slicing

2009-09-08 Thread Jean-Sébastien Guay
Hi Troy, Competitive isn't an issue, as swig and boost.python bindings aren't really compatible (or is that 'sip' bindings that aren't compatible?). Personally I prefer a manual approach over automatically generated bindings; apparently for the same reasons that some compiler writers insist o

Re: [C++-sig] boost.python - C++ class overridden in python causes slicing

2009-09-08 Thread Jean-Sébastien Guay
Hi again Troy, I was thinking of setting up a googlecode project for this work, because there is at least one other person who might be interested in working with me on it (Paul Melis). I'll see if I can do that soon. It's done now, here: http://code.google.com/p/osgboostpython/ Note that I

Re: [C++-sig] boost.python - C++ class overridden in python causes slicing

2009-09-08 Thread troy d. straszheim
Jean-Sébastien Guay wrote: Hello Troy, I've been doing a bunch of work with osg recently. I like it and badly miss some boost.python bindings. I'd be very interested to have a look at the code here, maybe pitch in a bit. Is there a git archive I can clone, and a failing test I can run?

Re: [C++-sig] boost.python - C++ class overridden in python causes slicing

2009-09-08 Thread Jean-Sébastien Guay
Hello Troy, I've been doing a bunch of work with osg recently. I like it and badly miss some boost.python bindings. I'd be very interested to have a look at the code here, maybe pitch in a bit. Is there a git archive I can clone, and a failing test I can run? I was thinking of setting up

Re: [C++-sig] boost.python - C++ class overridden in python causes slicing

2009-09-08 Thread troy d. straszheim
Jean-Sébastien Guay wrote: Hi all, Thanks to previous help (a while ago) I was able to make considerable progress wrapping a pretty complex library (OpenSceneGraph) with boost.python. Hey Jean-Sebatien, I've been doing a bunch of work with osg recently. I like it and badly miss some boo

[C++-sig] boost.python - C++ class overridden in python causes slicing

2009-09-07 Thread Jean-Sébastien Guay
Hi all, Thanks to previous help (a while ago) I was able to make considerable progress wrapping a pretty complex library (OpenSceneGraph) with boost.python. I've been working on this a bit more lately in my free time, and I've been able to wrap pretty much everything I wanted to. It's startin