bpo-33387: Fix compiler warning in frame_block_unwind() (GH-18099) · python/cpython@629023c (original) (raw)

Skip to content

Provide feedback

Saved searches

Use saved searches to filter your results more quickly

Sign up

Appearance settings

Commit 629023c

Replace int with intptr_t to fix the warning: objects\frameobject.c(341): warning C4244: 'initializing': conversion from '__int64' to 'int', possible loss of data

File tree

1 file changed

lines changed

1 file changed

lines changed

Original file line number Diff line number Diff line change
@@ -338,7 +338,7 @@ frame_block_unwind(PyFrameObject *f)
338 338 assert(f->f_iblock > 0);
339 339 f->f_iblock--;
340 340 PyTryBlock *b = &f->f_blockstack[f->f_iblock];
341 -int delta = (f->f_stacktop - f->f_valuestack) - b->b_level;
341 +intptr_t delta = (f->f_stacktop - f->f_valuestack) - b->b_level;
342 342 while (delta > 0) {
343 343 frame_stack_pop(f);
344 344 delta--;