[pygccxml-commit] SF.net SVN: pygccxml: [348] pyplusplus_dev/unittests/data
Brought to you by:
mbaas,
roman_yakovenko
From: <rom...@us...> - 2006-07-26 06:18:40
|
Revision: 348 Author: roman_yakovenko Date: 2006-07-25 23:13:19 -0700 (Tue, 25 Jul 2006) ViewCVS: http://svn.sourceforge.net/pygccxml/?rev=348&view=rev Log Message: ----------- adding new warning about duplicate values to enum Modified Paths: -------------- pyplusplus_dev/pyplusplus/decl_wrappers/enumeration_wrapper.py pyplusplus_dev/unittests/data/enums_to_be_exported.hpp Modified: pyplusplus_dev/pyplusplus/decl_wrappers/enumeration_wrapper.py =================================================================== --- pyplusplus_dev/pyplusplus/decl_wrappers/enumeration_wrapper.py 2006-07-25 17:47:50 UTC (rev 347) +++ pyplusplus_dev/pyplusplus/decl_wrappers/enumeration_wrapper.py 2006-07-26 06:13:19 UTC (rev 348) @@ -59,4 +59,15 @@ no_export_values = property( _get_no_export_values, _set_export_values, doc= """A list of (C++) enumeration names that should not be exported. - @type: list""") + @type: list""") + + def _readme_impl( self ): + msgs = [] + if self.name: + name2value = self.get_name2value_dict() + if len( set( name2value.keys() ) ) != len( set( name2value.values() ) ): + msgs.append( "Boost.Python does not support enums with duplicate values. " + "You can read more about this here: http://boost.org/libs/python/todo.html#support-for-enums-with-duplicate-values . " + "The quick work around is to add new class variable to the exported enum, from Python. " ) + return msgs + Modified: pyplusplus_dev/unittests/data/enums_to_be_exported.hpp =================================================================== --- pyplusplus_dev/unittests/data/enums_to_be_exported.hpp 2006-07-25 17:47:50 UTC (rev 347) +++ pyplusplus_dev/unittests/data/enums_to_be_exported.hpp 2006-07-26 06:13:19 UTC (rev 348) @@ -12,7 +12,12 @@ red = 1 , green = 2 , blue = 4 }; - + +enum numbers{ + zero = 0 + , noll = 0 +}; + inline int to_int( int x=red ){ return x; } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |