[C++-sig] Boost.Python: C++ object in python: Cannot add to C++ base class list.

2015-10-09 Thread Christoff Kok
Hi, I am trying to extend existing C++ objects in Python via inheritance. I can do this successfully and run virtual methods overridden in Python. When I however, try to add the python object to a list of pointers of the C++ Base object type(the Base object the python class has overridden), I get

[C++-sig] Boost.Python: Set pointer error.

2015-10-05 Thread Christoff Kok
quot;).def(vector_indexing_suite>()); } This is the Python code: import sandbox cont = sandbox.Cont() p1 = cont.createP() print(cont.pList[0].amount) a = sandbox.A() a.p = p1 Any help will be greatly appreciated. I've been struggling with this for a while now. Regards, -- Christof

Re: [C++-sig] Boost.Python C++ object reference in Python: unexpected behaviour.

2015-06-03 Thread Christoff Kok
store heap allocated objects for all my complex types (to keep it consistent for maintenance and simplicity's sake). Thank you for all your assistance, I greatly appreciate it. You saved me a lot of time. Regards, Christoff On 2 June 2015 at 16:55, Stefan Seefeld wrote: > On 02/06/15 10:36 AM

Re: [C++-sig] Boost.Python C++ object reference in Python: unexpected behaviour.

2015-06-02 Thread Christoff Kok
a > solution to your problem, which still is that you reference objects > beyond their lifetime. > > HTH, > Stefan > > -- > > ...ich hab' noch einen Koffer in Berlin... > > _______ > Cplusplus-sig mailing list > Cp

Re: [C++-sig] Boost.Python C++ object reference in Python: unexpected behaviour.

2015-06-02 Thread Christoff Kok
Hi, This looks like a bug in Boost.Python to me. Could anyone confirm this? I provided a minimal, full working example. I would like to make sure it is a bug before reporting it as one. Christoff On 28 May 2015 at 09:29, Christoff Kok wrote: > Hi, > > I am having an issue with Boo

[C++-sig] Boost.Python C++ object reference in Python: unexpected behaviour.

2015-05-29 Thread Christoff Kok
Hi, I am having an issue with Boost.Python with a very simple use case. I am returning a reference to an object, and it seems that my python object looses its C++ object's reference at a stage for some reason. Please see my *example* below reproducing this issue. *C++ Code:* #include #include