summaryrefslogtreecommitdiffstats
path: root/Python
diff options
context:
space:
mode:
authorBarry Warsaw <barry@python.org>2000-08-18 05:02:16 (GMT)
committerBarry Warsaw <barry@python.org>2000-08-18 05:02:16 (GMT)
commit5ca1ef92384d8e4e940bd34ce8150c087931b18b (patch)
treebb61af2162a841a98d30d3ce0210303e0ec7dfe1 /Python
parent9d23a4eb037abc4d6026dda09ffda39eb8701a1e (diff)
downloadcpython-5ca1ef92384d8e4e940bd34ce8150c087931b18b.zip
cpython-5ca1ef92384d8e4e940bd34ce8150c087931b18b.tar.gz
cpython-5ca1ef92384d8e4e940bd34ce8150c087931b18b.tar.bz2
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.
Diffstat (limited to 'Python')
-rw-r--r--Python/bltinmodule.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/Python/bltinmodule.c b/Python/bltinmodule.c
index b9222b6..ea1269e 100644
--- a/Python/bltinmodule.c
+++ b/Python/bltinmodule.c
@@ -410,6 +410,7 @@ complex_from_string(PyObject *v)
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 @@ complex_from_string(PyObject *v)
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");