[C++-sig] Enums with duplicated values.
hugo.lima at openbossa.org
Tue Feb 10 13:34:26 CET 2009
David, any comments about the patch?
On Tue, Feb 3, 2009 at 3:55 PM, Hugo Lima <hugo.lima at openbossa.org> wrote:
> On Fri, Dec 19, 2008 at 12:13 AM, David Abrahams <dave at boostpro.com> wrote:
>> on Wed Dec 17 2008, "Hugo Lima" <hugo.lima-AT-openbossa.org> wrote:
>>> I need wrap enums with duplicated values, but boost::python do not
>>> support it. At the boost website you can find the quote:
>>> "Scott Snyder provided a patch; Dave was dissatisfied for some reason,
>> I think I didn't really like the asymmetry of the "othervalues" field; I
>> would probably prefer to store all values in a dict of lists.
> I agree, so I'm sending a patch that does exactly this.
> If the enum does not have duplicated values, all remains the same (the
> "values" attribute is a dict of value=>enum_type).
> If it has duplicated values, the duplicated values point to a tuple of
> enum_types in the values attr dict.
> - Maybe I should use lists instead of tuples to avoid the list <=>
> tuple conversion
> - I did not use tuples for all entries in the values attribute to
> keep the source compatibility.
> If this patch get accepted, is there any chance to include it in the
> 1.38.0 release?
>>> but maybe it should just be applied if no further action occurs
>>> Why this patch was not been accepted since 2003?
>> Well, I suppose it's a lot better than no patch at all, so it should be
>>> What can we do to get this patch accepted, so we do not have to
>>> maintain a boost-copy on our repositories?
>> You can run the Boost.Python test suite with the patch in place against
>> trunk, and assure me that all the tests pass. If you do that, I'll be
>> inclined to apply it and move it to the release branch.
>> Thanks for the bump,
>> Dave Abrahams
>> BoostPro Computing
>> Cplusplus-sig mailing list
>> Cplusplus-sig at python.org
More information about the Cplusplus-sig