summaryrefslogtreecommitdiffstats
path: root/Include
diff options
context:
space:
mode:
authorGregory P. Smith <greg@krypto.org>2022-10-03 20:55:45 (GMT)
committerGitHub <noreply@github.com>2022-10-03 20:55:45 (GMT)
commitb0f89cb4311b696f875e58f14258ce315be09bce (patch)
treec387a1482f5b7c1a12061cf0f755835cf95a6a71 /Include
parentcfbc7dd91059cb663c7fe13c661665943495ed7f (diff)
downloadcpython-b0f89cb4311b696f875e58f14258ce315be09bce.zip
cpython-b0f89cb4311b696f875e58f14258ce315be09bce.tar.gz
cpython-b0f89cb4311b696f875e58f14258ce315be09bce.tar.bz2
gh-96512: Move int_max_str_digits setting to PyConfig (#96944)
It had to live as a global outside of PyConfig for stable ABI reasons in the pre-3.12 backports. This removes the `_Py_global_config_int_max_str_digits` and gets rid of the equivalent field in the internal `struct _is PyInterpreterState` as code can just use the existing nested config struct within that. Adds tests to verify unique settings and configs in subinterpreters.
Diffstat (limited to 'Include')
-rw-r--r--Include/cpython/initconfig.h1
-rw-r--r--Include/internal/pycore_initconfig.h2
-rw-r--r--Include/internal/pycore_interp.h2
3 files changed, 1 insertions, 4 deletions
diff --git a/Include/cpython/initconfig.h b/Include/cpython/initconfig.h
index c6057a4..c22c8d5 100644
--- a/Include/cpython/initconfig.h
+++ b/Include/cpython/initconfig.h
@@ -178,6 +178,7 @@ typedef struct PyConfig {
wchar_t *check_hash_pycs_mode;
int use_frozen_modules;
int safe_path;
+ int int_max_str_digits;
/* --- Path configuration inputs ------------ */
int pathconfig_warnings;
diff --git a/Include/internal/pycore_initconfig.h b/Include/internal/pycore_initconfig.h
index 6e49126..69f88d7 100644
--- a/Include/internal/pycore_initconfig.h
+++ b/Include/internal/pycore_initconfig.h
@@ -170,8 +170,6 @@ extern void _Py_DumpPathConfig(PyThreadState *tstate);
PyAPI_FUNC(PyObject*) _Py_Get_Getpath_CodeObject(void);
-extern int _Py_global_config_int_max_str_digits; // TODO(gpshead): move this into PyConfig in 3.12 after the backports ship.
-
/* --- Function used for testing ---------------------------------- */
diff --git a/Include/internal/pycore_interp.h b/Include/internal/pycore_interp.h
index e7f914e..b21708a 100644
--- a/Include/internal/pycore_interp.h
+++ b/Include/internal/pycore_interp.h
@@ -175,8 +175,6 @@ struct _is {
struct types_state types;
struct callable_cache callable_cache;
- int int_max_str_digits;
-
/* The following fields are here to avoid allocation during init.
The data is exposed through PyInterpreterState pointer fields.
These fields should not be accessed directly outside of init.