Commit e9f72dbf authored by Benjamin Peterson's avatar Benjamin Peterson

merge 3.2

parents f2f2bfee c5d7518a
......@@ -585,7 +585,7 @@ new_identifier(const char* n, struct compiling *c)
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;
/*
......@@ -593,7 +593,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;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment