[Python-checkins] CVS: python/dist/src/Objects object.c,2.123,2.124
M.-A. Lemburg
lemburg@users.sourceforge.net
Sun, 25 Mar 2001 11:16:16 -0800
Update of /cvsroot/python/python/dist/src/Objects
In directory usw-pr-cvs1:/tmp/cvs-serv10721
Modified Files:
object.c
Log Message:
Fixed ref count bug. Patch #411191. Found by Walter Dörwald.
Index: object.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Objects/object.c,v
retrieving revision 2.123
retrieving revision 2.124
diff -C2 -r2.123 -r2.124
*** object.c 2001/02/27 04:45:05 2.123
--- object.c 2001/03/25 19:16:13 2.124
***************
*** 347,352 ****
return v;
}
! else if (PyString_Check(v))
res = v;
else if (v->ob_type->tp_str != NULL)
res = (*v->ob_type->tp_str)(v);
--- 347,354 ----
return v;
}
! else if (PyString_Check(v)) {
! Py_INCREF(v);
res = v;
+ }
else if (v->ob_type->tp_str != NULL)
res = (*v->ob_type->tp_str)(v);