mirror of
https://github.com/python/cpython
synced 2026-09-29 12:10:30 +03:00
bpo-36301: Remove _PyCoreConfig.preconfig (GH-12546)
* Replace _PyCoreConfig.preconfig with 3 new fields in _PyCoreConfig: isolated, use_environment, dev_mode. * Add _PyPreCmdline.dev_mode. * Add _Py_PreInitializeFromPreConfigInPlace().
This commit is contained in:
parent
f78a5e9ce8
commit
20004959d2
13 changed files with 179 additions and 145 deletions
|
|
@ -16,12 +16,14 @@ typedef struct {
|
|||
_PyWstrList xoptions; /* "-X value" option */
|
||||
int use_environment; /* -E option */
|
||||
int isolated; /* -I option */
|
||||
int dev_mode; /* -X dev and PYTHONDEVMODE */
|
||||
} _PyPreCmdline;
|
||||
|
||||
#define _PyPreCmdline_INIT \
|
||||
(_PyPreCmdline){ \
|
||||
.use_environment = -1, \
|
||||
.isolated = -1}
|
||||
.isolated = -1, \
|
||||
.dev_mode = -1}
|
||||
/* Note: _PyPreCmdline_INIT sets other fields to 0/NULL */
|
||||
|
||||
PyAPI_FUNC(void) _PyPreCmdline_Clear(_PyPreCmdline *cmdline);
|
||||
|
|
@ -112,7 +114,7 @@ PyAPI_FUNC(void) _PyCoreConfig_SetGlobalConfig(const _PyCoreConfig *config);
|
|||
PyAPI_FUNC(_PyInitError) _PyCoreConfig_Read(_PyCoreConfig *config);
|
||||
PyAPI_FUNC(_PyInitError) _PyCoreConfig_ReadFromArgv(_PyCoreConfig *config,
|
||||
const _PyArgv *args);
|
||||
PyAPI_FUNC(_PyInitError) _PyCoreConfig_Write(const _PyCoreConfig *config);
|
||||
PyAPI_FUNC(void) _PyCoreConfig_Write(const _PyCoreConfig *config);
|
||||
|
||||
/* --- _PyMainInterpreterConfig ----------------------------------- */
|
||||
|
||||
|
|
|
|||
|
|
@ -77,6 +77,9 @@ extern void _PyGILState_Fini(void);
|
|||
|
||||
PyAPI_FUNC(void) _PyGC_DumpShutdownStats(void);
|
||||
|
||||
PyAPI_FUNC(_PyInitError) _Py_PreInitializeInPlace(
|
||||
_PyPreConfig *config);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue