Skip to content

Commit 078c4e3

Browse files
authored
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.
1 parent 4114846 commit 078c4e3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Objects/frameobject.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -297,7 +297,7 @@ frame_setlineno(PyFrameObject *f, PyObject* p_new_lineno)
297297
if (delta_iblock > 0) {
298298
f->f_iblock -= delta_iblock;
299299
PyTryBlock *b = &f->f_blockstack[f->f_iblock];
300-
delta += (f->f_stacktop - f->f_valuestack) - b->b_level;
300+
delta += (int)(f->f_stacktop - f->f_valuestack) - b->b_level;
301301
if (b->b_type == SETUP_FINALLY &&
302302
code[b->b_handler] == WITH_CLEANUP_START)
303303
{

0 commit comments

Comments
 (0)