mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
merge
This commit is contained in:
commit
9af740b99a
3 changed files with 20 additions and 7 deletions
|
@ -3141,15 +3141,15 @@ _PyEval_EvalFrameDefault(PyFrameObject *f, int throwflag)
|
|||
_Py_IDENTIFIER(__exit__);
|
||||
_Py_IDENTIFIER(__enter__);
|
||||
PyObject *mgr = TOP();
|
||||
PyObject *exit = special_lookup(mgr, &PyId___exit__), *enter;
|
||||
PyObject *enter = special_lookup(mgr, &PyId___enter__), *exit;
|
||||
PyObject *res;
|
||||
if (enter == NULL)
|
||||
goto error;
|
||||
exit = special_lookup(mgr, &PyId___exit__);
|
||||
if (exit == NULL)
|
||||
goto error;
|
||||
SET_TOP(exit);
|
||||
enter = special_lookup(mgr, &PyId___enter__);
|
||||
Py_DECREF(mgr);
|
||||
if (enter == NULL)
|
||||
goto error;
|
||||
res = PyObject_CallFunctionObjArgs(enter, NULL);
|
||||
Py_DECREF(enter);
|
||||
if (res == NULL)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue