Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Labels
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
nexedi
cython
Commits
5f1f8795
Commit
5f1f8795
authored
6 years ago
by
Stefan Behnel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix metaclass usage in cpdef-enums by using the Py3 syntax (which is also more efficient).
parent
dc9a9649
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
2 deletions
+1
-2
Cython/Utility/CpdefEnums.pyx
Cython/Utility/CpdefEnums.pyx
+1
-2
No files found.
Cython/Utility/CpdefEnums.pyx
View file @
5f1f8795
...
@@ -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
:
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment