Skip to content

Commit 98b3668

Browse files
Address Sergey's review
Co-authored-by: Sergey B Kirpichev <[email protected]>
1 parent c59bef0 commit 98b3668

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Objects/longobject.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -342,10 +342,10 @@ _PyLong_Negate(PyLongObject **x_p)
342342
return _PyLong_FromMedium((sdigit)ival); \
343343
} \
344344
/* Count digits (at least two - smaller cases were handled above). */ \
345-
abs_ival = ival < 0 ? 0U-(UINT_TYPE)ival : (UINT_TYPE)ival; \
345+
UINT_TYPE abs_ival = ival < 0 ? 0U-(UINT_TYPE)ival : (UINT_TYPE)ival; \
346346
/* Do shift in two steps to avoid possible undefined behavior. */ \
347-
t = abs_ival >> PyLong_SHIFT >> PyLong_SHIFT; \
348-
ndigits = 2; \
347+
UINT_TYPE t = abs_ival >> PyLong_SHIFT >> PyLong_SHIFT; \
348+
int ndigits = 2; \
349349
while (t) { \
350350
++ndigits; \
351351
t >>= PyLong_SHIFT; \

0 commit comments

Comments
 (0)