Commit 078c4e35 authored by Victor Stinner's avatar Victor Stinner Committed by GitHub

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.
parent 41148462
......@@ -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)
{
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment