File tree Expand file tree Collapse file tree 2 files changed +4
-0
lines changed
Expand file tree Collapse file tree 2 files changed +4
-0
lines changed Original file line number Diff line number Diff 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 */
234235static inline bool
235236_PyLong_HasImmortalTag (const PyLongObject * op )
236237{
Original file line number Diff line number Diff 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
You can’t perform that action at this time.
0 commit comments