[Python-checkins] python/dist/src/Objects
unicodeobject.c,2.149,2.150
Neal Norwitz
neal@metaslash.com
Wed, 29 May 2002 09:24:45 -0400
lemburg@users.sourceforge.net wrote:
> Index: unicodeobject.c
> ===================================================================
> substr = PyUnicode_FromObject(substr);
> if (substr == NULL) {
> Py_DECREF(substr);
> ! return -2;
> }
Can this code be correct? If substr is NULL, then it will be DECREF'd?
It would seem the original substr should perhaps be DECREF'd.
It seems like there needs to be another local variable.
Also looking at the handling of str wrt DECREF'ing, this is different
than substr, is that correct?
Neal