Skip to content

Commit f6ab450

Browse files
committed
address review: skip initialization of digit[0]
1 parent ddd329f commit f6ab450

File tree

1 file changed

+1
-8
lines changed

1 file changed

+1
-8
lines changed

Include/internal/pycore_long.h

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -285,19 +285,12 @@ _PyLong_SameSign(const PyLongObject *a, const PyLongObject *b)
285285
return (a->long_value.lv_tag & SIGN_MASK) == (b->long_value.lv_tag & SIGN_MASK);
286286
}
287287

288-
/* Initialize a freshly-allocated int.
289-
*
290-
* Fast operations for single digit integers (including zero)
291-
* assume that there is always at least one digit present.
292-
* The digit has to be initialized explicitly to avoid
293-
* use-of-uninitialized-value.
294-
*/
288+
/* Initialize a freshly-allocated int. */
295289
static inline void
296290
_PyLong_InitTag(PyLongObject *op)
297291
{
298292
assert(PyLong_Check(op));
299293
op->long_value.lv_tag = 1; /* non-immortal zero */
300-
op->long_value.ob_digit[0] = 0;
301294
}
302295

303296
#define TAG_FROM_SIGN_AND_SIZE(sign, size) \

0 commit comments

Comments
 (0)