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
Kirill Smelkov
cython
Commits
dc9c9ea5
Commit
dc9c9ea5
authored
May 21, 2008
by
Stefan Behnel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix method calls on Cython generated Python classes
parent
68f891c8
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
3 additions
and
9 deletions
+3
-9
Cython/Compiler/ExprNodes.py
Cython/Compiler/ExprNodes.py
+1
-1
Cython/Compiler/ModuleNode.py
Cython/Compiler/ModuleNode.py
+1
-3
tests/run/append.pyx
tests/run/append.pyx
+1
-5
No files found.
Cython/Compiler/ExprNodes.py
View file @
dc9c9ea5
...
...
@@ -2483,7 +2483,7 @@ class UnboundMethodNode(ExprNode):
def
generate_result_code
(
self
,
code
):
code
.
putln
(
"%s =
__Pyx_
PyMethod_New(%s, 0, %s); %s"
%
(
"%s = PyMethod_New(%s, 0, %s); %s"
%
(
self
.
result_code
,
self
.
function
.
py_result
(),
self
.
class_cname
,
...
...
Cython/Compiler/ModuleNode.py
View file @
dc9c9ea5
...
...
@@ -416,9 +416,7 @@ class ModuleNode(Nodes.Node, Nodes.BlockNode):
code
.
putln
(
"#if PY_MAJOR_VERSION >= 3"
)
code
.
putln
(
" #define PyNumber_Divide(x,y) PyNumber_TrueDivide(x,y)"
)
code
.
putln
(
" #define __Pyx_PyMethod_New(func, self, klass) PyMethod_New(func, klass)"
)
code
.
putln
(
"#else"
)
code
.
putln
(
" #define __Pyx_PyMethod_New(func, self, klass) PyMethod_New(func, self, klass)"
)
code
.
putln
(
" #define PyMethod_New(func, self, klass) PyInstanceMethod_New(func)"
)
code
.
putln
(
"#endif"
)
code
.
putln
(
"#ifndef __stdcall"
)
...
...
tests/run/append.pyx
View file @
dc9c9ea5
...
...
@@ -21,16 +21,12 @@ None
[1, 2, (3, 4), 5, 6]
"""
cdef
extern
from
"Python.h"
:
ctypedef
class
__builtin__
.
list
[
object
PyListObject
]:
pass
class
A
:
def
append
(
self
,
x
):
print
u"appending"
return
x
c
def
c
lass
B
(
list
):
class
B
(
list
):
def
append
(
self
,
*
args
):
for
arg
in
args
:
list
.
append
(
self
,
arg
)
...
...
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