[C++-sig] Contructor with "with_custodian_and_ward_postcall"

2008-11-03 Thread Renato Araujo
Hi all, Im trying create a binding for the flowing example: C++ struct object { object(object *parent); }; when the object parent is destroyed then all children will be destroyed too. How I can solve this with boost::python? I'm trying in this way: object_wrapper* _ojbect_cons

[C++-sig] Unit testing python/C++ code

2008-11-03 Thread Alan Baljeu
I'm going with unittest by default. I just thought I'd ask if doing C++ interop might motivate a different choice of tool. Anybody? Alan Baljeu __ Yahoo! Canada Toolbar: Search from anywhere on the web, and bookmark your

Re: [C++-sig] Contructor with "with_custodian_and_ward_postcall"

2008-11-03 Thread Renato Araujo
I will explain this more. First I have a c++ class like this: struct object { object(object *parent=0) // if parent !=NULL append this at parent children list ~object() //Destroy all children }; Is possible implement this using "python::with_custodian_and_ward_postcall"? I tried s

[C++-sig] Fwd: Contructor with "with_custodian_and_ward_postcall"

2008-11-03 Thread Renato Araujo
Sorry my last message I sent incomplete :) I will try again. First I have a c++ class like this: struct object { object(object *parent=0) // if parent !=NULL append this at parent children list ~object() //Destroy all children }; Is possible implement this using "python::with_custo

[C++-sig] [pybindgen] references?

2008-11-03 Thread Alan Baljeu
I just read the tutorial page on pybindgen, but it doesn't talk about reference types. 99% of my C++ code involves passing around things like foo&, so this is significant to me. How is it done? __ Instant Messaging, free

Re: [C++-sig] [pybindgen] references?

2008-11-03 Thread Gustavo Carneiro
2008/11/3 Alan Baljeu <[EMAIL PROTECTED]> > I just read the tutorial page on pybindgen, but it doesn't talk about > reference types. 99% of my C++ code involves passing around things like > foo&, so this is significant to me. How is it done? e.g.: MyClass.add_method("foobar", retval('void'),

Re: [C++-sig] [pybindgen] references?

2008-11-03 Thread Stefan Seefeld
Alan Baljeu wrote: I just read the tutorial page on pybindgen, but it doesn't talk about reference types. 99% of my C++ code involves passing around things like foo&, so this is significant to me. How is it done? If you need fine-grained control about argument passing policies (as soo

Re: [C++-sig] [pybindgen] references?

2008-11-03 Thread Alan Baljeu
From: Stefan Seefeld <[EMAIL PROTECTED]> >If you need fine-grained control about argument passing policies (as >soon as you need reference-semantics, you have to be careful about >lifetime management, for example), you are better off writing >boost.python bindings manually, I would suggest. > >R