From: Benjamin Peterson Date: Sun, 2 Sep 2012 18:38:08 +0000 (-0400) Subject: move variable decl to the top of the function X-Git-Tag: v3.2.4rc1~574 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=c5d7518a2eb139172f324a3c6a1ea78ee312b1a5;p=thirdparty%2FPython%2Fcpython.git move variable decl to the top of the function --- diff --git a/Python/ast.c b/Python/ast.c index 3d0e3844b729..d2bf032c5095 100644 --- a/Python/ast.c +++ b/Python/ast.c @@ -89,7 +89,7 @@ new_identifier(const char* n, PyArena *arena) static int ast_error(const node *n, const char *errstr) { - PyObject *u = Py_BuildValue("zii", errstr, LINENO(n), n->n_col_offset); + PyObject *u = Py_BuildValue("zii", errstr, LINENO(n), n->n_col_offset), *save; if (!u) return 0; /* @@ -97,7 +97,7 @@ ast_error(const node *n, const char *errstr) * exception in order to chain it. ast_error_finish, however, requires the * error not to be normalized. */ - PyObject *save = PyThreadState_GET()->exc_value; + save = PyThreadState_GET()->exc_value; PyThreadState_GET()->exc_value = NULL; PyErr_SetObject(PyExc_SyntaxError, u); PyThreadState_GET()->exc_value = save;