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
Gwenaël Samain
cython
Commits
2ab73fc7
Commit
2ab73fc7
authored
Aug 21, 2015
by
Robert Bradshaw
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Generate custom deallocation code when there are C++ members to destruct.
parent
0fbd0a33
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
0 deletions
+5
-0
Cython/Compiler/Symtab.py
Cython/Compiler/Symtab.py
+4
-0
Cython/Compiler/TypeSlots.py
Cython/Compiler/TypeSlots.py
+1
-0
No files found.
Cython/Compiler/Symtab.py
View file @
2ab73fc7
...
@@ -1856,6 +1856,7 @@ class CClassScope(ClassScope):
...
@@ -1856,6 +1856,7 @@ class CClassScope(ClassScope):
# getset_table_cname string
# getset_table_cname string
# has_pyobject_attrs boolean Any PyObject attributes?
# has_pyobject_attrs boolean Any PyObject attributes?
# has_memoryview_attrs boolean Any memory view attributes?
# has_memoryview_attrs boolean Any memory view attributes?
# has_cpp_class_attrs boolean Any (non-pointer) C++ attributes?
# has_cyclic_pyobject_attrs boolean Any PyObject attributes that may need GC?
# has_cyclic_pyobject_attrs boolean Any PyObject attributes that may need GC?
# property_entries [Entry]
# property_entries [Entry]
# defined boolean Defined in .pxd file
# defined boolean Defined in .pxd file
...
@@ -1866,6 +1867,7 @@ class CClassScope(ClassScope):
...
@@ -1866,6 +1867,7 @@ class CClassScope(ClassScope):
has_pyobject_attrs
=
False
has_pyobject_attrs
=
False
has_memoryview_attrs
=
False
has_memoryview_attrs
=
False
has_cpp_class_attrs
=
False
has_cyclic_pyobject_attrs
=
False
has_cyclic_pyobject_attrs
=
False
defined
=
False
defined
=
False
implemented
=
False
implemented
=
False
...
@@ -1941,6 +1943,8 @@ class CClassScope(ClassScope):
...
@@ -1941,6 +1943,8 @@ class CClassScope(ClassScope):
self
.
var_entries
.
append
(
entry
)
self
.
var_entries
.
append
(
entry
)
if
type
.
is_memoryviewslice
:
if
type
.
is_memoryviewslice
:
self
.
has_memoryview_attrs
=
True
self
.
has_memoryview_attrs
=
True
elif
type
.
is_cpp_class
:
self
.
has_cpp_class_attrs
=
True
elif
type
.
is_pyobject
and
name
!=
'__weakref__'
:
elif
type
.
is_pyobject
and
name
!=
'__weakref__'
:
self
.
has_pyobject_attrs
=
True
self
.
has_pyobject_attrs
=
True
if
(
not
type
.
is_builtin_type
if
(
not
type
.
is_builtin_type
...
...
Cython/Compiler/TypeSlots.py
View file @
2ab73fc7
...
@@ -361,6 +361,7 @@ class ConstructorSlot(InternalMethodSlot):
...
@@ -361,6 +361,7 @@ class ConstructorSlot(InternalMethodSlot):
and
scope
.
parent_type
.
base_type
and
scope
.
parent_type
.
base_type
and
not
scope
.
has_pyobject_attrs
and
not
scope
.
has_pyobject_attrs
and
not
scope
.
has_memoryview_attrs
and
not
scope
.
has_memoryview_attrs
and
not
scope
.
has_cpp_class_attrs
and
not
scope
.
lookup_here
(
self
.
method
)):
and
not
scope
.
lookup_here
(
self
.
method
)):
# if the type does not have object attributes, it can
# if the type does not have object attributes, it can
# delegate GC methods to its parent - iff the parent
# delegate GC methods to its parent - iff the parent
...
...
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