[Python-checkins] python/dist/src/Objects unicodeobject.c,2.183,2.184

rhettinger@users.sourceforge.net rhettinger@users.sourceforge.net
Sat, 08 Mar 2003 23:30:45 -0800


Update of /cvsroot/python/python/dist/src/Objects
In directory sc8-pr-cvs1:/tmp/cvs-serv20399

Modified Files:
	unicodeobject.c 
Log Message:
Sf patch #700047: unicode object leaks refcount on resizing
Contributed by Hye-Shik Chang.


Index: unicodeobject.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Objects/unicodeobject.c,v
retrieving revision 2.183
retrieving revision 2.184
diff -C2 -d -r2.183 -r2.184
*** unicodeobject.c	6 Mar 2003 12:53:07 -0000	2.183
--- unicodeobject.c	9 Mar 2003 07:30:43 -0000	2.184
***************
*** 277,280 ****
--- 277,281 ----
  	Py_UNICODE_COPY(w->str, v->str,
  			length < v->length ? length : v->length);
+ 	Py_DECREF(*unicode);
  	*unicode = (PyObject *)w;
  	return 0;