]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
GH-131296: fix clang-cl warning on Windows in `Objects/longobject.c` for 32bit builds...
authorChris Eibl <138194463+chris-eibl@users.noreply.github.com>
Fri, 18 Apr 2025 08:45:30 +0000 (10:45 +0200)
committerGitHub <noreply@github.com>
Fri, 18 Apr 2025 08:45:30 +0000 (10:45 +0200)
Objects/longobject.c

index 692312c1ad976cb695cd7b7e14f6a65f3e77eff9..ffb3f95bdb95937dbcc1cada120a18a33bc5a4de 100644 (file)
@@ -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;