Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit e9f72db

Browse files
committed
merge 3.2
2 parents f2f2bfe + c5d7518 commit e9f72db

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

Python/ast.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -585,15 +585,15 @@ new_identifier(const char* n, struct compiling *c)
585585
static int
586586
ast_error(const node *n, const char *errstr)
587587
{
588-
PyObject *u = Py_BuildValue("zii", errstr, LINENO(n), n->n_col_offset);
588+
PyObject *u = Py_BuildValue("zii", errstr, LINENO(n), n->n_col_offset), *save;
589589
if (!u)
590590
return 0;
591591
/*
592592
* Prevent the error from being chained. PyErr_SetObject will normalize the
593593
* exception in order to chain it. ast_error_finish, however, requires the
594594
* error not to be normalized.
595595
*/
596-
PyObject *save = PyThreadState_GET()->exc_value;
596+
save = PyThreadState_GET()->exc_value;
597597
PyThreadState_GET()->exc_value = NULL;
598598
PyErr_SetObject(PyExc_SyntaxError, u);
599599
PyThreadState_GET()->exc_value = save;

0 commit comments

Comments
 (0)