diff options
Diffstat (limited to 'Python/Python-ast.c')
-rw-r--r-- | Python/Python-ast.c | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/Python/Python-ast.c b/Python/Python-ast.c index c44ce383c6..d4734187de 100644 --- a/Python/Python-ast.c +++ b/Python/Python-ast.c @@ -465,14 +465,9 @@ static PyTypeObject* make_type(char *type, PyTypeObject* base, char**fields, int { PyObject *fnames, *result; int i; - if (num_fields) { - fnames = PyTuple_New(num_fields); - if (!fnames) return NULL; - } else { - fnames = Py_None; - Py_INCREF(Py_None); - } - for(i=0; i < num_fields; i++) { + fnames = PyTuple_New(num_fields); + if (!fnames) return NULL; + for (i = 0; i < num_fields; i++) { PyObject *field = PyString_FromString(fields[i]); if (!field) { Py_DECREF(fnames); |