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
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Gwenaël Samain
cython
Commits
deca2abd
Commit
deca2abd
authored
Mar 09, 2015
by
Robert Bradshaw
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #372 from cython/fix-pypy3
PyPy3 Fixes
parents
6bd3f7b9
8103da5b
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
8 deletions
+13
-8
Cython/Compiler/TypeSlots.py
Cython/Compiler/TypeSlots.py
+7
-5
Cython/Utility/ModuleSetupCode.c
Cython/Utility/ModuleSetupCode.c
+6
-3
No files found.
Cython/Compiler/TypeSlots.py
View file @
deca2abd
...
...
@@ -664,11 +664,13 @@ property_accessor_signatures = {
#
#------------------------------------------------------------------------------------------
PyNumberMethods_Py3_GUARD
=
"PY_MAJOR_VERSION < 3 || CYTHON_COMPILING_IN_PYPY"
PyNumberMethods
=
(
MethodSlot
(
binaryfunc
,
"nb_add"
,
"__add__"
),
MethodSlot
(
binaryfunc
,
"nb_subtract"
,
"__sub__"
),
MethodSlot
(
binaryfunc
,
"nb_multiply"
,
"__mul__"
),
MethodSlot
(
binaryfunc
,
"nb_divide"
,
"__div__"
,
py3
=
False
),
MethodSlot
(
binaryfunc
,
"nb_divide"
,
"__div__"
,
ifdef
=
PyNumberMethods_Py3_GUARD
),
MethodSlot
(
binaryfunc
,
"nb_remainder"
,
"__mod__"
),
MethodSlot
(
binaryfunc
,
"nb_divmod"
,
"__divmod__"
),
MethodSlot
(
ternaryfunc
,
"nb_power"
,
"__pow__"
),
...
...
@@ -682,18 +684,18 @@ PyNumberMethods = (
MethodSlot
(
binaryfunc
,
"nb_and"
,
"__and__"
),
MethodSlot
(
binaryfunc
,
"nb_xor"
,
"__xor__"
),
MethodSlot
(
binaryfunc
,
"nb_or"
,
"__or__"
),
EmptySlot
(
"nb_coerce"
,
py3
=
False
),
EmptySlot
(
"nb_coerce"
,
ifdef
=
PyNumberMethods_Py3_GUARD
),
MethodSlot
(
unaryfunc
,
"nb_int"
,
"__int__"
,
fallback
=
"__long__"
),
MethodSlot
(
unaryfunc
,
"nb_long"
,
"__long__"
,
fallback
=
"__int__"
,
py3
=
"<RESERVED>"
),
MethodSlot
(
unaryfunc
,
"nb_float"
,
"__float__"
),
MethodSlot
(
unaryfunc
,
"nb_oct"
,
"__oct__"
,
py3
=
False
),
MethodSlot
(
unaryfunc
,
"nb_hex"
,
"__hex__"
,
py3
=
False
),
MethodSlot
(
unaryfunc
,
"nb_oct"
,
"__oct__"
,
ifdef
=
PyNumberMethods_Py3_GUARD
),
MethodSlot
(
unaryfunc
,
"nb_hex"
,
"__hex__"
,
ifdef
=
PyNumberMethods_Py3_GUARD
),
# Added in release 2.0
MethodSlot
(
ibinaryfunc
,
"nb_inplace_add"
,
"__iadd__"
),
MethodSlot
(
ibinaryfunc
,
"nb_inplace_subtract"
,
"__isub__"
),
MethodSlot
(
ibinaryfunc
,
"nb_inplace_multiply"
,
"__imul__"
),
MethodSlot
(
ibinaryfunc
,
"nb_inplace_divide"
,
"__idiv__"
,
py3
=
False
),
MethodSlot
(
ibinaryfunc
,
"nb_inplace_divide"
,
"__idiv__"
,
ifdef
=
PyNumberMethods_Py3_GUARD
),
MethodSlot
(
ibinaryfunc
,
"nb_inplace_remainder"
,
"__imod__"
),
MethodSlot
(
ibinaryfunc
,
"nb_inplace_power"
,
"__ipow__"
),
# actually ternaryfunc!!!
MethodSlot
(
ibinaryfunc
,
"nb_inplace_lshift"
,
"__ilshift__"
),
...
...
Cython/Utility/ModuleSetupCode.c
View file @
deca2abd
...
...
@@ -59,13 +59,16 @@
#define __Pyx_DefaultClassType PyType_Type
#endif
#if
PY_MAJOR_VERSION >= 3
#if
!defined(Py_TPFLAGS_CHECKTYPES)
#define Py_TPFLAGS_CHECKTYPES 0
#endif
#if !defined(Py_TPFLAGS_HAVE_INDEX)
#define Py_TPFLAGS_HAVE_INDEX 0
#endif
#if !defined(Py_TPFLAGS_HAVE_NEWBUFFER)
#define Py_TPFLAGS_HAVE_NEWBUFFER 0
#endif
#if PY_VERSION_HEX < 0x030400a1 && !defined(Py_TPFLAGS_HAVE_FINALIZE)
#if !defined(Py_TPFLAGS_HAVE_FINALIZE)
#define Py_TPFLAGS_HAVE_FINALIZE 0
#endif
...
...
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