summaryrefslogtreecommitdiffstats
path: root/Python
diff options
context:
space:
mode:
Diffstat (limited to 'Python')
-rw-r--r--Python/Python-ast.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/Python/Python-ast.c b/Python/Python-ast.c
index fd96964..f73f035 100644
--- a/Python/Python-ast.c
+++ b/Python/Python-ast.c
@@ -8991,7 +8991,6 @@ PyObject* PyAST_mod2obj(mod_ty t)
/* mode is 0 for "exec", 1 for "eval" and 2 for "single" input */
mod_ty PyAST_obj2mod(PyObject* ast, PyArena* arena, int mode)
{
- mod_ty res;
PyObject *req_type[3];
char *req_name[] = {"Module", "Expression", "Interactive"};
int isinstance;
@@ -9017,6 +9016,8 @@ mod_ty PyAST_obj2mod(PyObject* ast, PyArena* arena, int mode)
req_name[mode], Py_TYPE(ast)->tp_name);
return NULL;
}
+
+ mod_ty res = NULL;
if (obj2ast_mod(ast, &res, arena) != 0)
return NULL;
else