summaryrefslogtreecommitdiffstats
path: root/Objects
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>2002-08-16 03:47:49 (GMT)
committerGuido van Rossum <guido@python.org>2002-08-16 03:47:49 (GMT)
commit8e829200b1ac79750224563331032de031b76288 (patch)
treec258112bdd3785e321dd6f739b4514ac7cb8a238 /Objects
parent9146f27b7799dab231083f194a14c6157b57549f (diff)
downloadcpython-8e829200b1ac79750224563331032de031b76288.zip
cpython-8e829200b1ac79750224563331032de031b76288.tar.gz
cpython-8e829200b1ac79750224563331032de031b76288.tar.bz2
Fix SF bug 595838 -- buffer in type_new() should not be static. Moved
to inner scope, too.
Diffstat (limited to 'Objects')
-rw-r--r--Objects/typeobject.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Objects/typeobject.c b/Objects/typeobject.c
index 145923a..c3c5893 100644
--- a/Objects/typeobject.c
+++ b/Objects/typeobject.c
@@ -1008,7 +1008,6 @@ type_new(PyTypeObject *metatype, PyObject *args, PyObject *kwds)
{
PyObject *name, *bases, *dict;
static char *kwlist[] = {"name", "bases", "dict", 0};
- static char buffer[256];
PyObject *slots, *tmp, *newslots;
PyTypeObject *type, *base, *tmptype, *winner;
etype *et;
@@ -1171,6 +1170,7 @@ type_new(PyTypeObject *metatype, PyObject *args, PyObject *kwds)
goto bad_slots;
for (i = j = 0; i < nslots; i++) {
char *s;
+ char buffer[256];
tmp = PyTuple_GET_ITEM(slots, i);
s = PyString_AS_STRING(tmp);
if ((add_dict && strcmp(s, "__dict__") == 0) ||