mirror of
https://github.com/python/cpython.git
synced 2024-11-25 02:44:06 +08:00
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:
parent
4114846265
commit
078c4e3519
@ -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)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user