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
66773260
Commit
66773260
authored
Aug 28, 2019
by
Jeroen Demeyer
Committed by
Stefan Behnel
Jun 14, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Always bind Cython functions
parent
caa52f6f
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
15 deletions
+12
-15
Cython/Utility/CythonFunction.c
Cython/Utility/CythonFunction.c
+0
-15
tests/run/cyfunction.pyx
tests/run/cyfunction.pyx
+12
-0
No files found.
Cython/Utility/CythonFunction.c
View file @
66773260
...
@@ -548,21 +548,6 @@ static int __Pyx_CyFunction_traverse(__pyx_CyFunctionObject *m, visitproc visit,
...
@@ -548,21 +548,6 @@ static int __Pyx_CyFunction_traverse(__pyx_CyFunctionObject *m, visitproc visit,
static
PyObject
*
__Pyx_CyFunction_descr_get
(
PyObject
*
func
,
PyObject
*
obj
,
PyObject
*
type
)
static
PyObject
*
__Pyx_CyFunction_descr_get
(
PyObject
*
func
,
PyObject
*
obj
,
PyObject
*
type
)
{
{
__pyx_CyFunctionObject
*
m
=
(
__pyx_CyFunctionObject
*
)
func
;
if
(
m
->
flags
&
__Pyx_CYFUNCTION_STATICMETHOD
)
{
Py_INCREF
(
func
);
return
func
;
}
if
(
m
->
flags
&
__Pyx_CYFUNCTION_CLASSMETHOD
)
{
if
(
type
==
NULL
)
type
=
(
PyObject
*
)(
Py_TYPE
(
obj
));
return
__Pyx_PyMethod_New
(
func
,
type
,
(
PyObject
*
)(
Py_TYPE
(
type
)));
}
if
(
obj
==
Py_None
)
obj
=
NULL
;
return
__Pyx_PyMethod_New
(
func
,
obj
,
type
);
return
__Pyx_PyMethod_New
(
func
,
obj
,
type
);
}
}
...
...
tests/run/cyfunction.pyx
View file @
66773260
...
@@ -376,6 +376,18 @@ class TestUnboundMethod:
...
@@ -376,6 +376,18 @@ class TestUnboundMethod:
def
meth
(
self
):
pass
def
meth
(
self
):
pass
class
TestStaticmethod
(
object
):
"""
>>> x = TestStaticmethod()
>>> x.staticmeth(42)
42
>>> x.staticmeth.__get__(42)()
42
"""
@
staticmethod
def
staticmeth
(
arg
):
return
arg
cdef
class
TestOptimisedBuiltinMethod
:
cdef
class
TestOptimisedBuiltinMethod
:
"""
"""
>>> obj = TestOptimisedBuiltinMethod()
>>> obj = TestOptimisedBuiltinMethod()
...
...
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