diff options
author | Tim Peters <tim.peters@gmail.com> | 2001-05-09 00:31:40 (GMT) |
---|---|---|
committer | Tim Peters <tim.peters@gmail.com> | 2001-05-09 00:31:40 (GMT) |
commit | b4bbcd76ea312f3bb2304671e8b022266175a7ea (patch) | |
tree | 091438d6d574192213a5c24acf20dd702499a083 /Objects/stringobject.c | |
parent | cf5ad5d6f6e6db029b6e7701b8d964ad21406641 (diff) | |
download | cpython-b4bbcd76ea312f3bb2304671e8b022266175a7ea.zip cpython-b4bbcd76ea312f3bb2304671e8b022266175a7ea.tar.gz cpython-b4bbcd76ea312f3bb2304671e8b022266175a7ea.tar.bz2 |
Ack! Restore the COUNT_ALLOCS one_strings code.
Diffstat (limited to 'Objects/stringobject.c')
-rw-r--r-- | Objects/stringobject.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/Objects/stringobject.c b/Objects/stringobject.c index 5bdbce9..8b51aab 100644 --- a/Objects/stringobject.c +++ b/Objects/stringobject.c @@ -563,8 +563,12 @@ string_item(PyStringObject *a, register int i) 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; } |