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
2fee9617
Commit
2fee9617
authored
Aug 28, 2015
by
Robert Bradshaw
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use reference rather than pointer for destructor calling.
This avoids the issue with overloaded address-of operators.
parent
febf956a
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
3 deletions
+3
-3
Cython/Compiler/ModuleNode.py
Cython/Compiler/ModuleNode.py
+1
-1
Cython/Utility/ModuleSetupCode.c
Cython/Utility/ModuleSetupCode.c
+2
-2
No files found.
Cython/Compiler/ModuleNode.py
View file @
2fee9617
...
...
@@ -1345,7 +1345,7 @@ class ModuleNode(Nodes.Node, Nodes.BlockNode):
code
.
putln
(
"if (p->__weakref__) PyObject_ClearWeakRefs(o);"
)
for
entry
in
cpp_class_attrs
:
code
.
putln
(
"__Pyx_call_destructor(
&
p->%s);"
%
entry
.
cname
)
code
.
putln
(
"__Pyx_call_destructor(p->%s);"
%
entry
.
cname
)
for
entry
in
py_attrs
:
code
.
put_xdecref_clear
(
"p->%s"
%
entry
.
cname
,
entry
.
type
,
nanny
=
False
,
...
...
Cython/Utility/ModuleSetupCode.c
View file @
2fee9617
...
...
@@ -248,8 +248,8 @@ typedef struct {
// Work around clang bug http://stackoverflow.com/questions/21847816/c-invoke-nested-template-class-destructor
template
<
typename
T
>
void
__Pyx_call_destructor
(
T
*
x
)
{
x
->
~
T
();
void
__Pyx_call_destructor
(
T
&
x
)
{
x
.
~
T
();
}
// Used for temporary variables of "reference" type.
...
...
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