mirror of
https://github.com/python/cpython.git
synced 2025-08-31 05:58:33 +00:00
merge 3.5 (#26991)
This commit is contained in:
commit
5b2b3aae2a
2 changed files with 5 additions and 1 deletions
|
@ -3291,6 +3291,7 @@ PyEval_EvalFrameEx(PyFrameObject *f, int throwflag)
|
|||
PyObject *anns = PyDict_New();
|
||||
if (anns == NULL) {
|
||||
Py_DECREF(func);
|
||||
Py_DECREF(names);
|
||||
goto error;
|
||||
}
|
||||
name_ix = PyTuple_Size(names);
|
||||
|
@ -3306,9 +3307,11 @@ PyEval_EvalFrameEx(PyFrameObject *f, int throwflag)
|
|||
if (err != 0) {
|
||||
Py_DECREF(anns);
|
||||
Py_DECREF(func);
|
||||
Py_DECREF(names);
|
||||
goto error;
|
||||
}
|
||||
}
|
||||
Py_DECREF(names);
|
||||
|
||||
if (PyFunction_SetAnnotations(func, anns) != 0) {
|
||||
/* Can't happen unless
|
||||
|
@ -3318,7 +3321,6 @@ PyEval_EvalFrameEx(PyFrameObject *f, int throwflag)
|
|||
goto error;
|
||||
}
|
||||
Py_DECREF(anns);
|
||||
Py_DECREF(names);
|
||||
}
|
||||
|
||||
/* XXX Maybe this should be a separate opcode? */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue