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
43c1cb2e
Commit
43c1cb2e
authored
Jun 03, 2018
by
Stefan Behnel
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch '0.28.x'
parents
4f4841aa
93c7400a
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
27 additions
and
1 deletion
+27
-1
CHANGES.rst
CHANGES.rst
+11
-0
Cython/Compiler/ModuleNode.py
Cython/Compiler/ModuleNode.py
+1
-1
tests/run/no_gc_clear.pyx
tests/run/no_gc_clear.pyx
+15
-0
No files found.
CHANGES.rst
View file @
43c1cb2e
...
...
@@ -39,6 +39,17 @@ Other changes
-------------
0.28.4 (2018-??-??)
===================
Bugs fixed
----------
* Reallowing ``tp_clear()`` in a subtype of an ``@no_gc_clear`` extension type
generated an invalid C function call to the (non-existent) base type implementation.
(Github issue #2309)
0.28.3 (2018-05-27)
===================
...
...
Cython/Compiler/ModuleNode.py
View file @
43c1cb2e
...
...
@@ -1606,7 +1606,7 @@ class ModuleNode(Nodes.Node, Nodes.BlockNode):
code
.
putln
(
"}"
)
def
generate_clear_function
(
self
,
scope
,
code
,
cclass_entry
):
tp_slot
=
TypeSlots
.
GCDependentSlot
(
"tp_clear"
)
tp_slot
=
TypeSlots
.
get_slot_by_name
(
"tp_clear"
)
slot_func
=
scope
.
mangle_internal
(
"tp_clear"
)
base_type
=
scope
.
parent_type
.
base_type
if
tp_slot
.
slot_code
(
scope
)
!=
slot_func
:
...
...
tests/run/no_gc_clear.pyx
View file @
43c1cb2e
...
...
@@ -56,6 +56,21 @@ cdef class DisableTpClear:
pto
.
tp_clear
(
self
)
cdef
class
ReallowTpClear
(
DisableTpClear
):
"""
>>> import gc
>>> obj = ReallowTpClear()
>>> is_tp_clear_null(obj)
False
>>> obj.attr = obj # create hard reference cycle
>>> del obj; _ignore = gc.collect()
# Problem: cannot really validate that the cycle was cleaned up without using weakrefs etc...
"""
cdef
public
object
attr
def
test_closure_without_clear
(
str
x
):
"""
>>> c = test_closure_without_clear('abc')
...
...
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