[Python-Dev] r84744 - python/branches/py3k/Objects/unicodeobject.c

Georg Brandl g.brandl at gmx.net
Sun Sep 12 19:21:11 CEST 2010


Victor changed this from "return NULL" to "goto fail" in r84730, claiming
that it would fix a reference leak.  Is the leak somewhere else then?

Georg

Am 12.09.2010 18:40, schrieb benjamin.peterson:
> Author: benjamin.peterson
> Date: Sun Sep 12 18:40:53 2010
> New Revision: 84744
> 
> Log:
> use return NULL; it's just as correct
> 
> Modified:
>    python/branches/py3k/Objects/unicodeobject.c
> 
> Modified: python/branches/py3k/Objects/unicodeobject.c
> ==============================================================================
> --- python/branches/py3k/Objects/unicodeobject.c	(original)
> +++ python/branches/py3k/Objects/unicodeobject.c	Sun Sep 12 18:40:53 2010
> @@ -769,7 +769,7 @@
>                  "PyUnicode_FromFormatV() expects an ASCII-encoded format "
>                  "string, got a non-ASCII byte: 0x%02x",
>                  (unsigned char)*f);
> -             goto fail;
> +             return NULL;
>           }
>      }
>      /* step 2: allocate memory for the results of


-- 
Thus spake the Lord: Thou shalt indent with four spaces. No more, no less.
Four shall be the number of spaces thou shalt indent, and the number of thy
indenting shall be four. Eight shalt thou not indent, nor either indent thou
two, excepting that thou then proceed to four. Tabs are right out.



More information about the Python-Dev mailing list