[Python-checkins] python/dist/src/Python ceval.c,2.413,2.414
arigo at users.sourceforge.net
arigo at users.sourceforge.net
Sat Aug 7 22:58:34 CEST 2004
Update of /cvsroot/python/python/dist/src/Python
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21715/Python
Modified Files:
ceval.c
Log Message:
This was quite a dark bug in my recent in-place string concatenation
hack: it would resize *interned* strings in-place! This occurred because
their reference counts do not have their expected value -- stringobject.c
hacks them. Mea culpa.
Index: ceval.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Python/ceval.c,v
retrieving revision 2.413
retrieving revision 2.414
diff -C2 -d -r2.413 -r2.414
*** ceval.c 6 Aug 2004 18:43:09 -0000 2.413
--- ceval.c 7 Aug 2004 20:58:32 -0000 2.414
***************
*** 4254,4258 ****
}
! if (v->ob_refcnt == 1) {
/* Now we own the last reference to 'v', so we can resize it
* in-place.
--- 4254,4258 ----
}
! if (v->ob_refcnt == 1 && !PyString_CHECK_INTERNED(v)) {
/* Now we own the last reference to 'v', so we can resize it
* in-place.
More information about the Python-checkins
mailing list