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
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
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
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
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
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