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
35efaff7
Commit
35efaff7
authored
Feb 24, 2009
by
Lisandro Dalcin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix reference leak in the capi export function, add testcase
parent
5c76095c
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
0 deletions
+15
-0
Cython/Compiler/ModuleNode.py
Cython/Compiler/ModuleNode.py
+1
-0
tests/run/capiimpl.pyx
tests/run/capiimpl.pyx
+14
-0
No files found.
Cython/Compiler/ModuleNode.py
View file @
35efaff7
...
...
@@ -2128,6 +2128,7 @@ static int __Pyx_ExportFunction(const char *name, void *f, const char *sig) {
goto bad;
if (PyDict_SetItemString(d, name, p) < 0)
goto bad;
Py_DECREF(p);
Py_DECREF(d);
return 0;
bad:
...
...
tests/run/capiimpl.pyx
0 → 100644
View file @
35efaff7
__doc__
=
u"""
>>> import sys
>>> sys.getrefcount(Foo.__pyx_vtable__)
2
>>> sys.getrefcount(__pyx_capi__['spam'])
2
"""
cdef
public
api
class
Foo
[
type
FooType
,
object
FooObject
]:
cdef
void
bar
(
self
):
pass
cdef
api
void
spam
():
pass
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