Skip to content

Commit

Permalink
bpo-33387: Fix compiler warning in frame_block_unwind() (GH-18099)
Browse files Browse the repository at this point in the history
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
  • Loading branch information
vstinner committed Jan 21, 2020
1 parent eab3b3f commit 629023c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Objects/frameobject.c
Original file line number Diff line number Diff line change
Expand Up @@ -338,7 +338,7 @@ frame_block_unwind(PyFrameObject *f)
assert(f->f_iblock > 0);
f->f_iblock--;
PyTryBlock *b = &f->f_blockstack[f->f_iblock];
int delta = (f->f_stacktop - f->f_valuestack) - b->b_level;
intptr_t delta = (f->f_stacktop - f->f_valuestack) - b->b_level;
while (delta > 0) {
frame_stack_pop(f);
delta--;
Expand Down

0 comments on commit 629023c

Please sign in to comment.