mirror of
https://github.com/python/cpython.git
synced 2026-01-06 15:32:22 +00:00
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.
This commit is contained in:
parent
cfbc7dd910
commit
b0f89cb431
13 changed files with 111 additions and 24 deletions
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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 ---------------------------------- */
|
||||
|
||||
|
|
|
|||
|
|
@ -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.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue