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
55d87d49
Commit
55d87d49
authored
Oct 08, 2014
by
Stefan Behnel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix PyMethod_New() in pypy3
parent
6b21b89a
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
6 deletions
+11
-6
Cython/Compiler/ExprNodes.py
Cython/Compiler/ExprNodes.py
+2
-2
Cython/Utility/CythonFunction.c
Cython/Utility/CythonFunction.c
+2
-3
Cython/Utility/ModuleSetupCode.c
Cython/Utility/ModuleSetupCode.c
+7
-1
No files found.
Cython/Compiler/ExprNodes.py
View file @
55d87d49
...
...
@@ -7518,7 +7518,7 @@ class BoundMethodNode(ExprNode):
def
generate_result_code
(
self
,
code
):
code
.
putln
(
"%s = PyMethod_New(%s, %s, (PyObject*)%s->ob_type); %s"
%
(
"%s =
__Pyx_
PyMethod_New(%s, %s, (PyObject*)%s->ob_type); %s"
%
(
self
.
result
(),
self
.
function
.
py_result
(),
self
.
self_object
.
py_result
(),
...
...
@@ -7550,7 +7550,7 @@ class UnboundMethodNode(ExprNode):
def
generate_result_code
(
self
,
code
):
class_cname
=
code
.
pyclass_stack
[
-
1
].
classobj
.
result
()
code
.
putln
(
"%s = PyMethod_New(%s, 0, %s); %s"
%
(
"%s =
__Pyx_
PyMethod_New(%s, 0, %s); %s"
%
(
self
.
result
(),
self
.
function
.
py_result
(),
class_cname
,
...
...
Cython/Utility/CythonFunction.c
View file @
55d87d49
...
...
@@ -545,13 +545,12 @@ static PyObject *__Pyx_CyFunction_descr_get(PyObject *func, PyObject *obj, PyObj
if
(
m
->
flags
&
__Pyx_CYFUNCTION_CLASSMETHOD
)
{
if
(
type
==
NULL
)
type
=
(
PyObject
*
)(
Py_TYPE
(
obj
));
return
PyMethod_New
(
func
,
type
,
(
PyObject
*
)(
Py_TYPE
(
type
)));
return
__Pyx_PyMethod_New
(
func
,
type
,
(
PyObject
*
)(
Py_TYPE
(
type
)));
}
if
(
obj
==
Py_None
)
obj
=
NULL
;
return
PyMethod_New
(
func
,
obj
,
type
);
return
__Pyx_
PyMethod_New
(
func
,
obj
,
type
);
}
static
PyObject
*
...
...
Cython/Utility/ModuleSetupCode.c
View file @
55d87d49
...
...
@@ -168,7 +168,13 @@
#endif
#if PY_MAJOR_VERSION >= 3
#define PyMethod_New(func, self, klass) ((self) ? PyMethod_New(func, self) : PyInstanceMethod_New(func))
#define __Pyx_PyMethod_New(func, self, klass) ((self) ? PyMethod_New(func, self) : PyInstanceMethod_New(func))
#ifndef PyMethod_New
/* for backwards compatibility only, but PyPy redefines PyMethod_New unconditionally */
#define PyMethod_New(func, self, klass) __Pyx_PyMethod_New(func, self, klass)
#endif
#else
#define __Pyx_PyMethod_New(func, self, klass) PyMethod_New(func, self, klass)
#endif
/* inline attribute */
...
...
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