projects
/
python
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4114846
)
bpo-33041: Fix downcast warning on Windows (#6595)
author
Victor Stinner
<vstinner@redhat.com>
Fri, 27 Apr 2018 12:30:01 +0000
(14:30 +0200)
committer
GitHub
<noreply@github.com>
Fri, 27 Apr 2018 12:30:01 +0000
(14:30 +0200)
Cast pointer difference from ssize_t to int: a frame is very unlikely
larger than 2 GB.
Objects/frameobject.c
patch
|
blob
|
history
diff --git
a/Objects/frameobject.c
b/Objects/frameobject.c
index 864a8f977ea39849c78a9d1b965dd77b14ebb1bc..14935a2147c4b8bb5de2e0e25caa8847f2d24665 100644
(file)
--- a/
Objects/frameobject.c
+++ b/
Objects/frameobject.c
@@
-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)
{