[Patches] [ python-Patches-1501180 ] Cyclic garbage collection support for slices

SourceForge.net noreply at sourceforge.net
Mon Jun 5 23:12:17 CEST 2006


Patches item #1501180, was opened at 2006-06-05 21:15
Message generated for change (Comment added) made by zseil
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=1501180&group_id=5470

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Core (C code)
Group: Python 2.5
Status: Open
Resolution: None
Priority: 5
Submitted By: Žiga Seilnacht (zseil)
Assigned to: Nobody/Anonymous (nobody)
Summary: Cyclic garbage collection support for slices

Initial Comment:
Slice's members start, stop and step can
be arbitrary python objects, which means
that slices can be easily included in
reference cycles (see the test in the
patch).
The patch includes the necessary changes
to enable support for the gc. Since slices
are immutable, there should be no need for
a tp_clear method.
I also changed the slice_dealloc function
to use Py_CLEAR macros instead of Py_DECREF.

I noticed that PySlice_GetIndices is still
missing support for types with a __index__
method. I don't know if that is intentional
or not.

----------------------------------------------------------------------

>Comment By: Žiga Seilnacht (zseil)
Date: 2006-06-05 23:12

Message:
Logged In: YES 
user_id=1326842

Updated a misleading comment.

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=1501180&group_id=5470


More information about the Patches mailing list