diff options
Diffstat (limited to 'Objects')
-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; } |