Mercurial > cpython-lru_cache-weakref
diff Python/bltinmodule.c @ 30430:a8f04cbf659c legacy-trunk
Correct check of PyUnicode_Resize() return value.
| author | Jeremy Hylton <jeremy@alum.mit.edu> |
|---|---|
| date | Tue, 16 Sep 2003 03:17:16 +0000 |
| parents | c9cc35249322 |
| children | 3b59fa5d25b1 |
line wrap: on
line diff
--- a/Python/bltinmodule.c Tue Sep 16 03:10:59 2003 +0000 +++ b/Python/bltinmodule.c Tue Sep 16 03:17:16 2003 +0000 @@ -2381,7 +2381,8 @@ to avoid reallocations */ if (need < 2 * outlen) need = 2 * outlen; - if (PyUnicode_Resize(&result, need)) { + if (PyUnicode_Resize( + &result, need) < 0) { Py_DECREF(item); goto Fail_1; }
