diff options
author | Victor Stinner <vstinner@redhat.com> | 2018-04-27 12:30:01 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-04-27 12:30:01 (GMT) |
commit | 078c4e3519deeef8014541925da057bb064eb5a8 (patch) | |
tree | 9f48594141d97876d6c71ee73ce502e3ff212cf1 | |
parent | 4114846265536344538ae44cb8ffd8ce2903faf7 (diff) | |
download | cpython-078c4e3519deeef8014541925da057bb064eb5a8.zip cpython-078c4e3519deeef8014541925da057bb064eb5a8.tar.gz cpython-078c4e3519deeef8014541925da057bb064eb5a8.tar.bz2 |
bpo-33041: Fix downcast warning on Windows (#6595)
Cast pointer difference from ssize_t to int: a frame is very unlikely
larger than 2 GB.
-rw-r--r-- | Objects/frameobject.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Objects/frameobject.c b/Objects/frameobject.c index 864a8f9..14935a2 100644 --- a/Objects/frameobject.c +++ b/Objects/frameobject.c @@ -297,7 +297,7 @@ frame_setlineno(PyFrameObject *f, PyObject* p_new_lineno) if (delta_iblock > 0) { f->f_iblock -= delta_iblock; PyTryBlock *b = &f->f_blockstack[f->f_iblock]; - delta += (f->f_stacktop - f->f_valuestack) - b->b_level; + delta += (int)(f->f_stacktop - f->f_valuestack) - b->b_level; if (b->b_type == SETUP_FINALLY && code[b->b_handler] == WITH_CLEANUP_START) { |