[pkg-boost-devel] Bug#523343: boost.python does not work with enums that have the same value

Anderson Lizardo anderson.lizardo at gmail.com
Thu Apr 9 13:54:04 UTC 2009


Package: boost1.38
Version: 1.38.0-3
Tags: patch

boost.python does not work with enums that have the same value, e.g.
wrapping the following enum using boost.python:

enum { red = 123, green = 123 };

Only either "red" or "green" will be available on the Python module,
because internally, boost maps this to a dictionary indexed by the
enum value.

More details on the upstream bug report:
https://svn.boost.org/trac/boost/ticket/2744

I'd propose applying the latest version (v2.3) of the patch on the bug
report, attached to this report for convenience (just cleaned up to
remove some UTF-8 characters in the diff headers). No more comments
were made about it since then, and it works for me.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: enum_with_duplicated_values.patch
Type: text/x-diff
Size: 4262 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/pkg-boost-devel/attachments/20090409/dfe872ff/attachment.patch>


More information about the pkg-boost-devel mailing list