diff options
author | Ammar Askar <ammar@ammaraskar.com> | 2020-06-04 05:19:23 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-06-04 05:19:23 (GMT) |
commit | 6e23a9c82b7fd2366003b9191cd93a9683b9d80c (patch) | |
tree | 58b7e912f2a357bb89545f261dc4977dd6345f53 /Objects | |
parent | 586be6f3ff68ab4034e555f1434a4427e129ad0b (diff) | |
download | cpython-6e23a9c82b7fd2366003b9191cd93a9683b9d80c.zip cpython-6e23a9c82b7fd2366003b9191cd93a9683b9d80c.tar.gz cpython-6e23a9c82b7fd2366003b9191cd93a9683b9d80c.tar.bz2 |
Fix MSVC warning in frameobject.c (GH-20590)
Diffstat (limited to 'Objects')
-rw-r--r-- | Objects/frameobject.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/Objects/frameobject.c b/Objects/frameobject.c index af32276..b6d073b 100644 --- a/Objects/frameobject.c +++ b/Objects/frameobject.c @@ -397,7 +397,9 @@ frame_setlineno(PyFrameObject *f, PyObject* p_new_lineno, void *Py_UNUSED(ignore return -1; } - int len = PyBytes_GET_SIZE(f->f_code->co_code)/sizeof(_Py_CODEUNIT); + int len = Py_SAFE_DOWNCAST( + PyBytes_GET_SIZE(f->f_code->co_code)/sizeof(_Py_CODEUNIT), + Py_ssize_t, int); int *lines = marklines(f->f_code, len); if (lines == NULL) { return -1; |