We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 39837b6 commit 7f911c1Copy full SHA for 7f911c1
Objects/longobject.c
@@ -1614,8 +1614,7 @@ long_to_decimal_string_internal(PyObject *aa,
1614
*/
1615
if (size_a >= 10 * _PY_LONG_MAX_STR_DIGITS_THRESHOLD
1616
/ (3 * PyLong_SHIFT) + 2) {
1617
- PyInterpreterState *interp = _PyInterpreterState_GET();
1618
- int max_str_digits = interp->int_max_str_digits;
+ int max_str_digits = _PyRuntime.int_max_str_digits;
1619
if ((max_str_digits > 0) &&
1620
(max_str_digits / (3 * PyLong_SHIFT) <= (size_a - 11) / 10)) {
1621
PyErr_Format(PyExc_ValueError, _MAX_STR_DIGITS_ERROR_FMT_TO_STR,
0 commit comments