Thank you again Stefan,
> What works in C++ and not in Python ? With the "reserve" calls the
> Python script you provided runs fine (for me).
I tested the code in a C++ console application, using the same example as
in the Python example I posted.
I meant, that, without the "reserve" calls, the C
On 02/06/15 10:36 AM, Christoff Kok wrote:
> Hi Stefan,
>
> Thank you very much. That makes sense and my tests prove it. The code
> runs as expected when I reserve enough space for the vector.
>
> I do not quite get it why it works in C++ and not python. I know too
> little about the C++ and python
Hi Stefan,
Thank you very much. That makes sense and my tests prove it. The code runs
as expected when I reserve enough space for the vector.
I do not quite get it why it works in C++ and not python. I know too little
about the C++ and python run-time.
I guess that the C++ run-time automatically
Christoff,
I just noticed I wasn't really answering the real problem you report,
which is the crash.
I believe the problem is in your code: You create two vectors of
value-types (cars and factories). Then you take references to the stored
objects, while there is no guarantee that the objects' add
On 02/06/15 01:34 AM, Christoff Kok wrote:
> 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.
The 'is' operator compares the identities of the two Py
> From: Christoff Kok
>To: cplusplus-sig@python.org
>Sent: Tuesday, June 2, 2015 7:34 AM
>Subject: Re: [C++-sig] Boost.Python C++ object reference in Python:
>unexpected behaviour.
>
>
>
>Hi,
>
>
>This looks like a bug in Boost.Python to me.
>
>
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 Boost.Python w
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