[Patches] [ python-Patches-565378 ] Expose _Py_ReleaseInternedStrings
noreply@sourceforge.net
noreply@sourceforge.net
Thu, 06 Jun 2002 09:03:46 -0700
Patches item #565378, was opened at 2002-06-06 11:45
You can respond by visiting:
http://sourceforge.net/tracker/?func=detail&atid=305470&aid=565378&group_id=5470
Category: Core (C code)
Group: Python 2.3
Status: Open
Resolution: None
Priority: 5
Submitted By: Barry A. Warsaw (bwarsaw)
Assigned to: Guido van Rossum (gvanrossum)
Summary: Expose _Py_ReleaseInternedStrings
Initial Comment:
An implementation of the idea expressed here:
http://mail.python.org/pipermail/python-dev/2002-June/025067.html
This exposes the clearing of the intern dictionary to
Python via gc.release_interns(). Patch includes doc
updates and a test case.
----------------------------------------------------------------------
>Comment By: Barry A. Warsaw (bwarsaw)
Date: 2002-06-06 12:03
Message:
Logged In: YES
user_id=12800
Guido also suggests to move this sys instead of gc (although
gc isn't totally out of the question). Maybe Neil has an
opinion one way or the other?
----------------------------------------------------------------------
Comment By: Barry A. Warsaw (bwarsaw)
Date: 2002-06-06 12:02
Message:
Logged In: YES
user_id=12800
Yes, I know why this isn't right. Notes:
- we probably want to incref the string pointed to by
ob_intern so that the reference is counted in the interned
string's refcount
- when the referent is freed, we'll need to decref the ob_intern
this addresses
http://mail.python.org/pipermail/python-dev/2002-June/025071.html
----------------------------------------------------------------------
Comment By: Guido van Rossum (gvanrossum)
Date: 2002-06-06 11:59
Message:
Logged In: YES
user_id=6380
Um, that's totally unsafe. See
http://mail.python.org/pipermail/python-dev/2002-June/025071.html
----------------------------------------------------------------------
You can respond by visiting:
http://sourceforge.net/tracker/?func=detail&atid=305470&aid=565378&group_id=5470