summaryrefslogtreecommitdiffstats
path: root/Objects/exceptions.c
diff options
context:
space:
mode:
authorThomas Wouters <thomas@python.org>2006-05-28 21:32:12 (GMT)
committerThomas Wouters <thomas@python.org>2006-05-28 21:32:12 (GMT)
commitc1282eef0c683e69950ccc9bc988f12437de22cb (patch)
tree8b119efa1a11fbad5301e4a300706d2b1e2d97c7 /Objects/exceptions.c
parent27596279a2890a61ba29407e5b5098e484cb9b9e (diff)
downloadcpython-c1282eef0c683e69950ccc9bc988f12437de22cb.zip
cpython-c1282eef0c683e69950ccc9bc988f12437de22cb.tar.gz
cpython-c1282eef0c683e69950ccc9bc988f12437de22cb.tar.bz2
Make last patch valid C89 so Windows compilers can deal with it.
Diffstat (limited to 'Objects/exceptions.c')
-rw-r--r--Objects/exceptions.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/Objects/exceptions.c b/Objects/exceptions.c
index 38e621d..2ac45fb 100644
--- a/Objects/exceptions.c
+++ b/Objects/exceptions.c
@@ -1046,6 +1046,7 @@ SyntaxError_str(PySyntaxErrorObject *self)
int have_filename = 0;
int have_lineno = 0;
char *buffer = NULL;
+ Py_ssize_t bufsize;
if (self->msg)
str = PyObject_Str(self->msg);
@@ -1065,7 +1066,7 @@ SyntaxError_str(PySyntaxErrorObject *self)
if (!have_filename && !have_lineno)
return str;
- Py_ssize_t bufsize = PyString_GET_SIZE(str) + 64;
+ bufsize = PyString_GET_SIZE(str) + 64;
if (have_filename)
bufsize += PyString_GET_SIZE(self->filename);