diff options
author | Victor Stinner <vstinner@python.org> | 2020-04-28 22:56:58 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-04-28 22:56:58 (GMT) |
commit | 6d86a2331e6b64a2ae80c1a21f81baa5a71ac594 (patch) | |
tree | 43b1e88fff7e3122019b4d948758534aeed39a87 /Python/_warnings.c | |
parent | 521c8d6806adf0305c158d280ec00cca48e8ab22 (diff) | |
download | cpython-6d86a2331e6b64a2ae80c1a21f81baa5a71ac594.zip cpython-6d86a2331e6b64a2ae80c1a21f81baa5a71ac594.tar.gz cpython-6d86a2331e6b64a2ae80c1a21f81baa5a71ac594.tar.bz2 |
bpo-40429: PyFrame_GetCode() result cannot be NULL (GH-19772)
Add frame_nslots() to factorize duplicate code.
Diffstat (limited to 'Python/_warnings.c')
-rw-r--r-- | Python/_warnings.c | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/Python/_warnings.c b/Python/_warnings.c index 91c611c..7a620dc 100644 --- a/Python/_warnings.c +++ b/Python/_warnings.c @@ -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; |