[Python-checkins] CVS: python/dist/src/Objects stringobject.c,2.84,2.85

Barry Warsaw python-dev@python.org
Wed, 16 Aug 2000 16:41:04 -0700


Update of /cvsroot/python/python/dist/src/Objects
In directory slayer.i.sourceforge.net:/tmp/cvs-serv15917

Modified Files:
	stringobject.c 
Log Message:
Insure properly identifies the `interned' dictionary as leaking at
shutdown time, but CVS log entry for revision 2.45 explains why this
is so.  Simply include a comment so we don't have to re-figure it out
again 5 years from now.


Index: stringobject.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Objects/stringobject.c,v
retrieving revision 2.84
retrieving revision 2.85
diff -C2 -r2.84 -r2.85
*** stringobject.c	2000/07/31 15:28:04	2.84
--- stringobject.c	2000/08/16 23:41:01	2.85
***************
*** 2851,2854 ****
--- 2851,2866 ----
  #ifdef INTERN_STRINGS
  
+ /* This dictionary will leak at PyString_Fini() time.  That's acceptable
+  * because PyString_Fini() specifically frees interned strings that are
+  * only referenced by this dictionary.  The CVS log entry for revision 2.45
+  * says:
+  *
+  *    Change the Fini function to only remove otherwise unreferenced
+  *    strings from the interned table.  There are references in
+  *    hard-to-find static variables all over the interpreter, and it's not
+  *    worth trying to get rid of all those; but "uninterning" isn't fair
+  *    either and may cause subtle failures later -- so we have to keep them
+  *    in the interned table.
+  */
  static PyObject *interned;