Skip to content

Commit 1f363f4

Browse files
committed
address review: some comments
1 parent 53523de commit 1f363f4

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

Include/internal/pycore_long.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -231,6 +231,7 @@ _PyLong_IsPositive(const PyLongObject *op)
231231
return (op->long_value.lv_tag & SIGN_MASK) == 0;
232232
}
233233

234+
/* Return true if the argument is a small int */
234235
static inline bool
235236
_PyLong_HasImmortalTag(const PyLongObject *op)
236237
{

Lib/test/test_capi/test_long.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -805,8 +805,11 @@ def to_digits(num):
805805

806806
def test_bug_143050(self):
807807
with support.adjust_int_max_str_digits(0):
808+
# Bug coming from using _pylong.int_from_string(), that
809+
# currently requires > 6000 decimal digits.
808810
int('-' + '0' * 7000, 10)
809811
_testcapi.test_immortal_small_ints()
812+
# Test also nonzero small int
810813
int('-' + '0' * 7000 + '123', 10)
811814
_testcapi.test_immortal_small_ints()
812815

0 commit comments

Comments
 (0)