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
Labels
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
nexedi
cython
Commits
d2fb1655
Commit
d2fb1655
authored
Mar 17, 2013
by
scoder
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #198 from pv/bug/fused-refcount
BUG: fix reference counting bug in fused type method descriptor
parents
976d57f2
d61c005f
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
2 deletions
+14
-2
Cython/Utility/CythonFunction.c
Cython/Utility/CythonFunction.c
+2
-2
tests/run/fused_types.pyx
tests/run/fused_types.pyx
+12
-0
No files found.
Cython/Utility/CythonFunction.c
View file @
d2fb1655
...
...
@@ -598,6 +598,7 @@ static PyObject *__pyx_FusedFunction_New(PyTypeObject *type,
PyObject
*
qualname
,
PyObject
*
self
,
PyObject
*
module
,
PyObject
*
code
);
static
int
__pyx_FusedFunction_clear
(
__pyx_FusedFunctionObject
*
self
);
static
PyTypeObject
*
__pyx_FusedFunctionType
=
NULL
;
static
int
__pyx_FusedFunction_init
(
void
);
...
...
@@ -624,8 +625,7 @@ __pyx_FusedFunction_New(PyTypeObject *type, PyMethodDef *ml, int flags,
}
static
void
__pyx_FusedFunction_dealloc
(
__pyx_FusedFunctionObject
*
self
)
{
Py_XDECREF
(
self
->
__signatures__
);
/* __pyx_CyFunction_dealloc((__pyx_CyFunctionObject *) m); */
__pyx_FusedFunction_clear
(
self
);
__pyx_FusedFunctionType
->
tp_free
((
PyObject
*
)
self
);
}
...
...
tests/run/fused_types.pyx
View file @
d2fb1655
...
...
@@ -222,6 +222,18 @@ def test_normal_class():
"""
NormalClass
().
method
[
pure_cython
.
short
](
10
)
def
test_normal_class_refcount
():
"""
>>> test_normal_class_refcount()
short 10
0
"""
import
sys
x
=
NormalClass
()
c
=
sys
.
getrefcount
(
x
)
x
.
method
[
pure_cython
.
short
](
10
)
print
sys
.
getrefcount
(
x
)
-
c
def
test_fused_declarations
(
cython
.
integral
i
,
cython
.
floating
f
):
"""
>>> test_fused_declarations[pure_cython.short, pure_cython.float](5, 6.6)
...
...
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