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.
This commit is contained in:
Victor Stinner 2018-04-27 14:30:01 +02:00 committed by GitHub
parent 4114846265
commit 078c4e3519
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -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)
{