[Python-checkins] CVS: python/dist/src/Python symtable.c,2.8,2.9

Tim Peters tim_one@users.sourceforge.net
Sat, 08 Dec 2001 15:40:41 -0800


Update of /cvsroot/python/python/dist/src/Python
In directory usw-pr-cvs1:/tmp/cvs-serv18569/python/Python

Modified Files:
	symtable.c 
Log Message:
PySymtableEntry_New():  I'm not sure what this routine is doing, but it
was obviously leaking an int object when whatever the heck it's looking for
was found.  Repaired that.  This accounts for why entering function and
class definitions at an interactive prompt leaked a reference to the
integer 1 each time.
Bugfix candidate.


Index: symtable.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Python/symtable.c,v
retrieving revision 2.8
retrieving revision 2.9
diff -C2 -d -r2.8 -r2.9
*** symtable.c	2001/12/04 02:41:46	2.8
--- symtable.c	2001/12/08 23:40:38	2.9
***************
*** 16,19 ****
--- 16,20 ----
  	v = PyDict_GetItem(st->st_symbols, k);
  	if (v) /* XXX could check that name, type, lineno match */ {
+ 		Py_DECREF(k);
  		Py_INCREF(v);
  		return v;