We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f3bf304 commit 248c6b5Copy full SHA for 248c6b5
Objects/longobject.c
@@ -909,7 +909,9 @@ _PyLong_NumBits(PyObject *vv)
909
assert(ndigits == 0 || v->long_value.ob_digit[ndigits - 1] != 0);
910
if (ndigits > 0) {
911
digit msd = v->long_value.ob_digit[ndigits - 1];
912
+#if SIZEOF_SIZE_T > 4
913
assert(ndigits <= INT64_MAX / PyLong_SHIFT);
914
+#endif
915
result = (int64_t)(ndigits - 1) * PyLong_SHIFT;
916
msd_bits = bit_length_digit(msd);
917
result += msd_bits;
0 commit comments