diff options
| -rwxr-xr-x | Parser/asdl_c.py | 5 | ||||
| -rw-r--r-- | Python/Python-ast.c | 5 |
2 files changed, 6 insertions, 4 deletions
diff --git a/Parser/asdl_c.py b/Parser/asdl_c.py index 1508e83..634ad29 100755 --- a/Parser/asdl_c.py +++ b/Parser/asdl_c.py @@ -733,8 +733,9 @@ static int add_attributes(PyTypeObject* type, char**attrs, int num_fields) { int i, result; PyObject *s, *l = PyTuple_New(num_fields); - if (!l) return 0; - for(i = 0; i < num_fields; i++) { + if (!l) + return 0; + for (i = 0; i < num_fields; i++) { s = PyString_FromString(attrs[i]); if (!s) { Py_DECREF(l); diff --git a/Python/Python-ast.c b/Python/Python-ast.c index 6b3424a..9a93bf3 100644 --- a/Python/Python-ast.c +++ b/Python/Python-ast.c @@ -527,8 +527,9 @@ static int add_attributes(PyTypeObject* type, char**attrs, int num_fields) { int i, result; PyObject *s, *l = PyTuple_New(num_fields); - if (!l) return 0; - for(i = 0; i < num_fields; i++) { + if (!l) + return 0; + for (i = 0; i < num_fields; i++) { s = PyString_FromString(attrs[i]); if (!s) { Py_DECREF(l); |
