Mercurial > cpython-lru_cache-weakref
diff Python/bltinmodule.c @ 14052:275bc4f9d50d legacy-trunk
comples_from_string(): Move s_buffer[] up to the top-level function
scope. Previously, s_buffer[] was defined inside the
PyUnicode_Check() scope, but referred to in the outer scope via
assignment to s. This quiets an Insure portability warning.
| author | Barry Warsaw <barry@python.org> |
|---|---|
| date | Fri, 18 Aug 2000 05:02:16 +0000 |
| parents | 5780b198abc8 |
| children | 20377f15b96a |
line wrap: on
line diff
--- a/Python/bltinmodule.c Fri Aug 18 05:01:19 2000 +0000 +++ b/Python/bltinmodule.c Fri Aug 18 05:02:16 2000 +0000 @@ -410,6 +410,7 @@ int sw_error=0; int sign; char buffer[256]; /* For errors */ + char s_buffer[256]; int len; if (PyString_Check(v)) { @@ -417,8 +418,6 @@ len = PyString_GET_SIZE(v); } else if (PyUnicode_Check(v)) { - char s_buffer[256]; - if (PyUnicode_GET_SIZE(v) >= sizeof(s_buffer)) { PyErr_SetString(PyExc_ValueError, "complex() literal too large to convert");
