mirror of
https://github.com/python/cpython.git
synced 2025-08-04 17:08:35 +00:00
bpo-32030: Simplify _PyCoreConfig_INIT macro (#4728)
* Simplify _PyCoreConfig_INIT, _PyMainInterpreterConfig_INIT, _PyPathConfig_INIT macros: no need to set fields to 0/NULL, it's redundant (the C language sets them to 0/NULL for us). * Fix typo: pymain_run_statup() => pymain_run_startup() * Remove a few XXX/TODO
This commit is contained in:
parent
ae342cf7de
commit
33c377ed9b
4 changed files with 12 additions and 51 deletions
|
@ -38,19 +38,8 @@ typedef struct {
|
|||
int show_alloc_count; /* -X showalloccount */
|
||||
} _PyCoreConfig;
|
||||
|
||||
#define _PyCoreConfig_INIT \
|
||||
(_PyCoreConfig){\
|
||||
.ignore_environment = 0, \
|
||||
.use_hash_seed = -1, \
|
||||
.hash_seed = 0, \
|
||||
._disable_importlib = 0, \
|
||||
.allocator = NULL, \
|
||||
.dev_mode = 0, \
|
||||
.faulthandler = 0, \
|
||||
.tracemalloc = 0, \
|
||||
.import_time = 0, \
|
||||
.show_ref_count = 0, \
|
||||
.show_alloc_count = 0}
|
||||
#define _PyCoreConfig_INIT (_PyCoreConfig){.use_hash_seed = -1}
|
||||
/* Note: _PyCoreConfig_INIT sets other fields to 0/NULL */
|
||||
|
||||
/* Placeholders while working on the new configuration API
|
||||
*
|
||||
|
@ -69,11 +58,8 @@ typedef struct {
|
|||
} _PyMainInterpreterConfig;
|
||||
|
||||
#define _PyMainInterpreterConfig_INIT \
|
||||
(_PyMainInterpreterConfig){\
|
||||
.install_signal_handlers = -1, \
|
||||
.module_search_path_env = NULL, \
|
||||
.home = NULL, \
|
||||
.program_name = NULL}
|
||||
(_PyMainInterpreterConfig){.install_signal_handlers = -1}
|
||||
/* Note: _PyMainInterpreterConfig_INIT sets other fields to 0/NULL */
|
||||
|
||||
typedef struct _is {
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue