mirror of
https://github.com/python/cpython.git
synced 2025-08-22 01:35:16 +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
|
@ -784,10 +784,6 @@ is_internal_frame(PyFrameObject *frame)
|
|||
}
|
||||
|
||||
PyCodeObject *code = PyFrame_GetCode(frame);
|
||||
if (code == NULL) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
PyObject *filename = code->co_filename;
|
||||
if (filename == NULL) {
|
||||
return 0;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue