On 1/16/2012 9:24 AM, David Froger wrote:
Hi,

Here is a more simple example that demonstrates my problem.

I set up and and ran your example.  I too get the crash when I try to print the elements.  However, I also get this output when I just checked types:
>>> for e in vec:
...     type(e)
...
swig/python detected a memory leak of type 'unknown', no destructor found.
<type 'SwigPyObject'>
swig/python detected a memory leak of type 'unknown', no destructor found.
<type 'SwigPyObject'>
swig/python detected a memory leak of type 'unknown', no destructor found.
<type 'SwigPyObject'>

So might the crash be occurring because you are trying to print an opaque type ('SwigPyObject') instead of the type of the enum?


Render me gone,                       |||
Bob                                 ^(===)^
---------------------------------oOO--(_)--OOo---------------------------------
    I'm not so good with advice...can I interest you in a sarcastic comment?