[C++-sig] Pickle an enum from c++

Matthew Scouten (TT) Matthew.Scouten at tradingtechnologies.com
Mon Jan 26 17:18:19 CET 2009


I ran the enum unit test that came with boost. I got the same error that
I got from my own example. (just on the pickle stuff. The rest passed.)
I am using 1.34.1, because that is the version of boost that the
library-to-be-wrapped is on.

Obviously, either my version of boost is broken, or something is wrong
with my environment. Has one else out there tried to run the unit tests
against this version recently?

(PS: Sorry to be reviving a thread after so long. Took along xmas break,
and have been busy with other projects since then. To restore context,
OP is here:
http://mail.python.org/pipermail/cplusplus-sig/2008-December/014084.html
)

-----Original Message-----
From:
cplusplus-sig-bounces+matthew.scouten=tradingtechnologies.com at python.org
[mailto:cplusplus-sig-bounces+matthew.scouten=tradingtechnologies.com at py
thon.org] On Behalf Of Ralf W. Grosse-Kunstleve
Sent: Friday, December 12, 2008 12:23 PM
To: Development of Python/C++ integration
Subject: Re: [C++-sig] Pickle an enum from c++

Could you try if the enum test works with your version of boost?
What version do you have?
I just tried it out (using the current boost svn trunk) and it works for
me.
I think it should work with any boost version after Dec 2006.
Note that you have to use pickle.HIGHEST_PROTOCOL as in the test,
otherwise
it crashes.




----- Original Message ----
From: Matthew Scouten (TT) <Matthew.Scouten at tradingtechnologies.com>
To: Development of Python/C++ integration <cplusplus-sig at python.org>
Sent: Friday, December 12, 2008 10:01:26 AM
Subject: Re: [C++-sig] Pickle an enum from c++

No, that didn't make a difference.

-----Original Message-----
From:
cplusplus-sig-bounces+matthew.scouten=tradingtechnologies.com at python.org
[mailto:cplusplus-sig-bounces+matthew.scouten=tradingtechnologies.com at py
thon.org] On Behalf Of Ralf W. Grosse-Kunstleve
Sent: Friday, December 12, 2008 10:29 AM
To: Development of Python/C++ integration
Subject: Re: [C++-sig] Pickle an enum from c++

> Is there something I am supposed to do to the enum_ to make it work?

Did you look at thid test?

boost/libs/python/test/enum.cpp

Do you have the .export_values()? (Not sure if that's important; I never
use enum.)

Ralf

_______________________________________________
Cplusplus-sig mailing list
Cplusplus-sig at python.org
http://mail.python.org/mailman/listinfo/cplusplus-sig


More information about the Cplusplus-sig mailing list