Commit 5f1f8795 authored by Stefan Behnel's avatar Stefan Behnel

Fix metaclass usage in cpdef-enums by using the Py3 syntax (which is also more efficient).

parent dc9a9649
...@@ -20,8 +20,7 @@ cdef class __Pyx_EnumMeta(type): ...@@ -20,8 +20,7 @@ cdef class __Pyx_EnumMeta(type):
# @cython.internal # @cython.internal
cdef object __Pyx_EnumBase cdef object __Pyx_EnumBase
class __Pyx_EnumBase(int): class __Pyx_EnumBase(int, metaclass=__Pyx_EnumMeta):
__metaclass__ = __Pyx_EnumMeta
def __new__(cls, value, name=None): def __new__(cls, value, name=None):
for v in cls: for v in cls:
if v == value: if v == value:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment