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 c59bef0 commit 98b3668Copy full SHA for 98b3668
Objects/longobject.c
@@ -342,10 +342,10 @@ _PyLong_Negate(PyLongObject **x_p)
342
return _PyLong_FromMedium((sdigit)ival); \
343
} \
344
/* Count digits (at least two - smaller cases were handled above). */ \
345
- abs_ival = ival < 0 ? 0U-(UINT_TYPE)ival : (UINT_TYPE)ival; \
+ UINT_TYPE abs_ival = ival < 0 ? 0U-(UINT_TYPE)ival : (UINT_TYPE)ival; \
346
/* Do shift in two steps to avoid possible undefined behavior. */ \
347
- t = abs_ival >> PyLong_SHIFT >> PyLong_SHIFT; \
348
- ndigits = 2; \
+ UINT_TYPE t = abs_ival >> PyLong_SHIFT >> PyLong_SHIFT; \
+ int ndigits = 2; \
349
while (t) { \
350
++ndigits; \
351
t >>= PyLong_SHIFT; \
0 commit comments