]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
bpo-33387: Fix compiler warning in frame_block_unwind() (GH-18099)
authorVictor Stinner <vstinner@python.org>
Tue, 21 Jan 2020 11:47:29 +0000 (12:47 +0100)
committerGitHub <noreply@github.com>
Tue, 21 Jan 2020 11:47:29 +0000 (12:47 +0100)
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

Objects/frameobject.c

index d7acb41f7a3a1a5546fce2046b3dd1c1ec6c9cc3..4469e3c20cd2f34dd889e2cb5a2ee5e2faa71472 100644 (file)
@@ -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--;