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
Boxiang Sun
cython
Commits
245461ee
Commit
245461ee
authored
Jul 16, 2008
by
Robert Bradshaw
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix memory leak in cpdef function.
Also fixed error check.
parent
82b78729
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
Cython/Compiler/Nodes.py
Cython/Compiler/Nodes.py
+2
-2
No files found.
Cython/Compiler/Nodes.py
View file @
245461ee
...
...
@@ -1937,7 +1937,7 @@ class OverrideCheckNode(StatNode):
code
.
putln
(
"else {"
)
else
:
code
.
putln
(
"else if (unlikely(Py_TYPE(%s)->tp_dictoffset != 0)) {"
%
self_arg
)
err
=
code
.
error_goto_if_null
(
self
_arg
,
self
.
pos
)
err
=
code
.
error_goto_if_null
(
self
.
func_node
.
result_code
,
self
.
pos
)
# need to get attribute manually--scope would return cdef method
code
.
putln
(
"%s = PyObject_GetAttr(%s, %s); %s"
%
(
self
.
func_node
.
result_code
,
self_arg
,
self
.
py_func
.
interned_attr_cname
,
err
))
# It appears that this type is not anywhere exposed in the Python/C API
...
...
@@ -1946,7 +1946,7 @@ class OverrideCheckNode(StatNode):
code
.
putln
(
'if (!%s || %s) {'
%
(
is_builtin_function_or_method
,
is_overridden
))
self
.
body
.
generate_execution_code
(
code
)
code
.
putln
(
'}'
)
# code.put_decref(self.func_temp
, PyrexTypes.py_object_type)
code
.
put_decref
(
self
.
func_node
.
result_code
,
PyrexTypes
.
py_object_type
)
code
.
putln
(
"}"
)
class
ClassDefNode
(
StatNode
,
BlockNode
):
...
...
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