mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +00:00
bpo-40429: PyFrame_GetCode() result cannot be NULL (GH-19772)
Add frame_nslots() to factorize duplicate code.
This commit is contained in:
parent
521c8d6806
commit
6d86a2331e
7 changed files with 45 additions and 48 deletions
|
@ -8040,11 +8040,6 @@ super_init(PyObject *self, PyObject *args, PyObject *kwds)
|
|||
return -1;
|
||||
}
|
||||
co = PyFrame_GetCode(f);
|
||||
if (co == NULL) {
|
||||
PyErr_SetString(PyExc_RuntimeError,
|
||||
"super(): no code object");
|
||||
return -1;
|
||||
}
|
||||
if (co->co_argcount == 0) {
|
||||
PyErr_SetString(PyExc_RuntimeError,
|
||||
"super(): no arguments");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue