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 53523de commit 1f363f4Copy full SHA for 1f363f4
2 files changed
Include/internal/pycore_long.h
@@ -231,6 +231,7 @@ _PyLong_IsPositive(const PyLongObject *op)
231
return (op->long_value.lv_tag & SIGN_MASK) == 0;
232
}
233
234
+/* Return true if the argument is a small int */
235
static inline bool
236
_PyLong_HasImmortalTag(const PyLongObject *op)
237
{
Lib/test/test_capi/test_long.py
@@ -805,8 +805,11 @@ def to_digits(num):
805
806
def test_bug_143050(self):
807
with support.adjust_int_max_str_digits(0):
808
+ # Bug coming from using _pylong.int_from_string(), that
809
+ # currently requires > 6000 decimal digits.
810
int('-' + '0' * 7000, 10)
811
_testcapi.test_immortal_small_ints()
812
+ # Test also nonzero small int
813
int('-' + '0' * 7000 + '123', 10)
814
815
0 commit comments