@@ -1767,7 +1767,7 @@ long_to_decimal_string_internal(PyObject *aa,
17671767 if (size_a >= 10 * _PY_LONG_MAX_STR_DIGITS_THRESHOLD
17681768 / (3 * PyLong_SHIFT ) + 2 ) {
17691769 PyInterpreterState * interp = _PyInterpreterState_GET ();
1770- int max_str_digits = interp -> config . int_max_str_digits ;
1770+ int max_str_digits = interp -> long_state . max_str_digits ;
17711771 if ((max_str_digits > 0 ) &&
17721772 (max_str_digits / (3 * PyLong_SHIFT ) <= (size_a - 11 ) / 10 )) {
17731773 PyErr_Format (PyExc_ValueError , _MAX_STR_DIGITS_ERROR_FMT_TO_STR ,
@@ -1837,7 +1837,7 @@ long_to_decimal_string_internal(PyObject *aa,
18371837 }
18381838 if (strlen > _PY_LONG_MAX_STR_DIGITS_THRESHOLD ) {
18391839 PyInterpreterState * interp = _PyInterpreterState_GET ();
1840- int max_str_digits = interp -> config . int_max_str_digits ;
1840+ int max_str_digits = interp -> long_state . max_str_digits ;
18411841 Py_ssize_t strlen_nosign = strlen - negative ;
18421842 if ((max_str_digits > 0 ) && (strlen_nosign > max_str_digits )) {
18431843 Py_DECREF (scratch );
@@ -2578,7 +2578,7 @@ long_from_string_base(const char **str, int base, PyLongObject **res)
25782578 * quadratic algorithm. */
25792579 if (digits > _PY_LONG_MAX_STR_DIGITS_THRESHOLD ) {
25802580 PyInterpreterState * interp = _PyInterpreterState_GET ();
2581- int max_str_digits = interp -> config . int_max_str_digits ;
2581+ int max_str_digits = interp -> long_state . max_str_digits ;
25822582 if ((max_str_digits > 0 ) && (digits > max_str_digits )) {
25832583 PyErr_Format (PyExc_ValueError , _MAX_STR_DIGITS_ERROR_FMT_TO_INT ,
25842584 max_str_digits , digits );
0 commit comments