[Python-checkins] CVS: python/dist/src/Python symtable.c,2.4,2.4.4.1

Anthony Baxter anthonybaxter@users.sourceforge.net
2001年12月20日 19:45:17 -0800


Update of /cvsroot/python/python/dist/src/Python
In directory usw-pr-cvs1:/tmp/cvs-serv27532
Modified Files:
 Tag: release21-maint
	symtable.c 
Log Message:
backport 2.9:
 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. 
Index: symtable.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Python/symtable.c,v
retrieving revision 2.4
retrieving revision 2.4.4.1
diff -C2 -d -r2.4 -r2.4.4.1
*** symtable.c	2001年02月27日 19:07:02	2.4
--- symtable.c	2001年12月21日 03:45:15	2.4.4.1
***************
*** 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;

AltStyle によって変換されたページ (->オリジナル) /