| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
Sorry, something went wrong.
| assert(PyList_CheckExact(consts)); | ||
|
|
||
| #if SIZEOF_SIZE_T > 4 | ||
| if (PyList_GET_SIZE(consts) >= UINT_MAX-1) { |
There was a problem hiding this comment.
My PR uses "if ((size_t)index >= UINT_MAX - 1) {" which shouldn't emit a compiler warning on 32-bit size_t.
Sorry, something went wrong.
| #if SIZEOF_SIZE_T > 4 | ||
| /* only replace if it is not too far away */ | ||
| if (oparg > UINT_MAX) { | ||
| h = -1; |
There was a problem hiding this comment.
I cannot overflow in practice. My PR uses an assertion instead, but also makes sure that the code is smaller than INT_MAX at PyCode_Optimize() entry point (sanity check, it should never occur in pratice, see my comment in my PR ;-)).
Sorry, something went wrong.
| eval loop's oparg (unsigned int), no rewritting | ||
| can be done. */ | ||
| #if SIZEOF_SIZE_T > 4 | ||
| if (oparg > UINT_MAX) |
There was a problem hiding this comment.
It cannot overflow in practice, again, see my PR.
Sorry, something went wrong.
| assert(i - nops <= INT_MAX); | ||
| /* original code offset => new code offset */ | ||
| blocks[i] = i - nops; | ||
| blocks[i] = (int)(i - nops); |
There was a problem hiding this comment.
blocks uses unsigned int, not signed int.
Sorry, something went wrong.
|
A Python core developer has requested some changes be made to your pull request before we can consider merging it. If you could please address their requests along with any other requests in other reviews from core developers that would be appreciated. Once you have made the requested changes, please leave a comment on this pull request containing the phrase I have made the requested changes; please review again. I will then notify any core developers who have left a review that you're ready for them to take another look at this pull request. |
Sorry, something went wrong.
|
This PR has multiple issues that I already fixed in my PR. So I close this one, sorry @jkloth. I prefer to focus on a single PR :) |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
Fixes compiler warnings in peephole.c when compiled for 64-bit.
https://bugs.python.org/issue9566