Mercurial > cpython-lru_cache-weakref
diff Objects/stringobject.c @ 17712:2a7cfc172a68 legacy-trunk
Ack! Restore the COUNT_ALLOCS one_strings code.
| author | Tim Peters <tim.peters@gmail.com> |
|---|---|
| date | Wed, 09 May 2001 00:31:40 +0000 |
| parents | 350be19ca6a5 |
| children | ede29ad6440a |
line wrap: on
line diff
--- a/Objects/stringobject.c Wed May 09 00:24:55 2001 +0000 +++ b/Objects/stringobject.c Wed May 09 00:31:40 2001 +0000 @@ -563,8 +563,12 @@ v = (PyObject *)characters[*pchar & UCHAR_MAX]; if (v == NULL) v = PyString_FromStringAndSize(pchar, 1); - else + else { +#ifdef COUNT_ALLOCS + one_strings++; +#endif Py_INCREF(v); + } return v; }
