2
0
mirror of https://github.com/boostorg/python.git synced 2026-01-20 16:52:15 +00:00

Allow duplicate enum values. Fixes #2744

Thanks to hugo.lima@openbossa.org


[SVN r53660]
This commit is contained in:
Dave Abrahams
2009-06-05 21:18:14 +00:00
parent 6ffeca641c
commit a4f028246a
3 changed files with 31 additions and 20 deletions

View File

@@ -12,7 +12,7 @@
#endif
using namespace boost::python;
enum color { red = 1, green = 2, blue = 4 };
enum color { red = 1, green = 2, blue = 4, blood = 1 };
#if BOOST_WORKAROUND(__MWERKS__, <= 0x2407)
namespace boost // Pro7 has a hard time detecting enums
@@ -34,6 +34,7 @@ BOOST_PYTHON_MODULE(enum_ext)
.value("red", red)
.value("green", green)
.value("blue", blue)
.value("blood", blood)
.export_values()
;