Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
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
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
59195fdf
Commit
59195fdf
authored
Jun 13, 2003
by
Guido van Rossum
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- SF patch 751998 fixes an unwanted side effect of the previous fix
for SF bug 742860 (the next item).
parent
d321efda
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
5 deletions
+13
-5
Objects/typeobject.c
Objects/typeobject.c
+13
-5
No files found.
Objects/typeobject.c
View file @
59195fdf
...
...
@@ -638,18 +638,17 @@ subtype_dealloc(PyObject *self)
--
_PyTrash_delete_nesting
;
_PyObject_GC_TRACK
(
self
);
/* We'll untrack for real later */
/* Find the nearest base with a different tp_dealloc
and clear slots while we're at it */
/* Find the nearest base with a different tp_dealloc */
base
=
type
;
while
((
basedealloc
=
base
->
tp_dealloc
)
==
subtype_dealloc
)
{
if
(
base
->
ob_size
)
clear_slots
(
base
,
self
);
base
=
base
->
tp_base
;
assert
(
base
);
}
/* If we added a weaklist, we clear it. Do this *before* calling
the finalizer (__del__) or clearing the instance dict. */
the finalizer (__del__), clearing slots, or clearing the instance
dict. */
if
(
type
->
tp_weaklistoffset
&&
!
base
->
tp_weaklistoffset
)
PyObject_ClearWeakRefs
(
self
);
...
...
@@ -660,6 +659,15 @@ subtype_dealloc(PyObject *self)
goto
endlabel
;
}
/* Clear slots up to the nearest base with a different tp_dealloc */
base
=
type
;
while
((
basedealloc
=
base
->
tp_dealloc
)
==
subtype_dealloc
)
{
if
(
base
->
ob_size
)
clear_slots
(
base
,
self
);
base
=
base
->
tp_base
;
assert
(
base
);
}
/* If we added a dict, DECREF it */
if
(
type
->
tp_dictoffset
&&
!
base
->
tp_dictoffset
)
{
PyObject
**
dictptr
=
_PyObject_GetDictPtr
(
self
);
...
...
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