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
74d10bf8
Commit
74d10bf8
authored
Oct 09, 2014
by
Robert Bradshaw
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of github.com:cython/cython
parents
0846423a
5968096a
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
17 additions
and
9 deletions
+17
-9
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
+13
-4
No files found.
Cython/Compiler/ExprNodes.py
View file @
74d10bf8
...
...
@@ -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 @
74d10bf8
...
...
@@ -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 @
74d10bf8
...
...
@@ -62,9 +62,6 @@
#if PY_MAJOR_VERSION >= 3
#define Py_TPFLAGS_CHECKTYPES 0
#define Py_TPFLAGS_HAVE_INDEX 0
#endif
#if PY_MAJOR_VERSION >= 3
#define Py_TPFLAGS_HAVE_NEWBUFFER 0
#endif
...
...
@@ -158,6 +155,12 @@
#define PyBoolObject PyLongObject
#endif
#if PY_MAJOR_VERSION >= 3 && CYTHON_COMPILING_IN_PYPY
#ifndef PyUnicode_InternFromString
#define PyUnicode_InternFromString(s) PyUnicode_FromString(s)
#endif
#endif
#if PY_VERSION_HEX < 0x030200A4
typedef
long
Py_hash_t
;
#define __Pyx_PyInt_FromHash_t PyInt_FromLong
...
...
@@ -168,7 +171,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