From 078c4e3519deeef8014541925da057bb064eb5a8 Mon Sep 17 00:00:00 2001 From: Victor Stinner Date: Fri, 27 Apr 2018 14:30:01 +0200 Subject: [PATCH] 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. --- Objects/frameobject.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Objects/frameobject.c b/Objects/frameobject.c index 864a8f977ea..14935a2147c 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) {