From b4bbcd76ea312f3bb2304671e8b022266175a7ea Mon Sep 17 00:00:00 2001 From: Tim Peters Date: Wed, 9 May 2001 00:31:40 +0000 Subject: Ack! Restore the COUNT_ALLOCS one_strings code. --- Objects/stringobject.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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; } -- cgit v0.12