mirror of
https://github.com/python/cpython.git
synced 2025-12-31 04:23:37 +00:00
GH-131296: fix clang-cl warning on Windows in Objects/longobject.c for 32bit builds (#131604)
This commit is contained in:
parent
fc0ec29889
commit
80295a8f9b
1 changed files with 2 additions and 0 deletions
|
|
@ -909,7 +909,9 @@ _PyLong_NumBits(PyObject *vv)
|
|||
assert(ndigits == 0 || v->long_value.ob_digit[ndigits - 1] != 0);
|
||||
if (ndigits > 0) {
|
||||
digit msd = v->long_value.ob_digit[ndigits - 1];
|
||||
#if SIZEOF_SIZE_T == 8
|
||||
assert(ndigits <= INT64_MAX / PyLong_SHIFT);
|
||||
#endif
|
||||
result = (int64_t)(ndigits - 1) * PyLong_SHIFT;
|
||||
msd_bits = bit_length_digit(msd);
|
||||
result += msd_bits;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue