| #ifndef Py_PYCORECONFIG_H |
| #define Py_PYCORECONFIG_H |
| #ifndef Py_LIMITED_API |
| #ifdef __cplusplus |
| extern "C" { |
| #endif |
|
|
| |
|
|
| typedef struct { |
| enum { |
| _PyStatus_TYPE_OK=0, |
| _PyStatus_TYPE_ERROR=1, |
| _PyStatus_TYPE_EXIT=2 |
| } _type; |
| const char *func; |
| const char *err_msg; |
| int exitcode; |
| } PyStatus; |
|
|
| PyAPI_FUNC(PyStatus) PyStatus_Ok(void); |
| PyAPI_FUNC(PyStatus) PyStatus_Error(const char *err_msg); |
| PyAPI_FUNC(PyStatus) PyStatus_NoMemory(void); |
| PyAPI_FUNC(PyStatus) PyStatus_Exit(int exitcode); |
| PyAPI_FUNC(int) PyStatus_IsError(PyStatus err); |
| PyAPI_FUNC(int) PyStatus_IsExit(PyStatus err); |
| PyAPI_FUNC(int) PyStatus_Exception(PyStatus err); |
|
|
| |
|
|
| typedef struct { |
| |
| |
| Py_ssize_t length; |
| wchar_t **items; |
| } PyWideStringList; |
|
|
| PyAPI_FUNC(PyStatus) PyWideStringList_Append(PyWideStringList *list, |
| const wchar_t *item); |
| PyAPI_FUNC(PyStatus) PyWideStringList_Insert(PyWideStringList *list, |
| Py_ssize_t index, |
| const wchar_t *item); |
|
|
|
|
| |
|
|
| typedef struct PyPreConfig { |
| int _config_init; |
|
|
| |
| |
| int parse_argv; |
|
|
| |
| |
| |
| |
| |
| int isolated; |
|
|
| |
| |
| |
| int use_environment; |
|
|
| |
| |
| int configure_locale; |
|
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| int coerce_c_locale; |
|
|
| |
| |
| |
| |
| |
| |
| int coerce_c_locale_warn; |
|
|
| #ifdef MS_WINDOWS |
| |
| |
| |
| |
| |
| |
| |
| |
| int legacy_windows_fs_encoding; |
| #endif |
|
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| int utf8_mode; |
|
|
| |
| |
| |
| |
| int dev_mode; |
|
|
| |
| |
| int allocator; |
| } PyPreConfig; |
|
|
| PyAPI_FUNC(void) PyPreConfig_InitPythonConfig(PyPreConfig *config); |
| PyAPI_FUNC(void) PyPreConfig_InitIsolatedConfig(PyPreConfig *config); |
|
|
|
|
| |
|
|
| |
| typedef struct PyConfig { |
| int _config_init; |
|
|
| int isolated; |
| int use_environment; |
| int dev_mode; |
| int install_signal_handlers; |
| int use_hash_seed; |
| unsigned long hash_seed; |
| int faulthandler; |
| int tracemalloc; |
| int import_time; |
| int code_debug_ranges; |
| int show_ref_count; |
| int dump_refs; |
| wchar_t *dump_refs_file; |
| int malloc_stats; |
| wchar_t *filesystem_encoding; |
| wchar_t *filesystem_errors; |
| wchar_t *pycache_prefix; |
| int parse_argv; |
| PyWideStringList orig_argv; |
| PyWideStringList argv; |
| PyWideStringList xoptions; |
| PyWideStringList warnoptions; |
| int site_import; |
| int bytes_warning; |
| int warn_default_encoding; |
| int inspect; |
| int interactive; |
| int optimization_level; |
| int parser_debug; |
| int write_bytecode; |
| int verbose; |
| int quiet; |
| int user_site_directory; |
| int configure_c_stdio; |
| int buffered_stdio; |
| wchar_t *stdio_encoding; |
| wchar_t *stdio_errors; |
| #ifdef MS_WINDOWS |
| int legacy_windows_stdio; |
| #endif |
| wchar_t *check_hash_pycs_mode; |
| int use_frozen_modules; |
| int safe_path; |
|
|
| |
| int pathconfig_warnings; |
| wchar_t *program_name; |
| wchar_t *pythonpath_env; |
| wchar_t *home; |
| wchar_t *platlibdir; |
|
|
| |
| int module_search_paths_set; |
| PyWideStringList module_search_paths; |
| wchar_t *stdlib_dir; |
| wchar_t *executable; |
| wchar_t *base_executable; |
| wchar_t *prefix; |
| wchar_t *base_prefix; |
| wchar_t *exec_prefix; |
| wchar_t *base_exec_prefix; |
|
|
| |
| int skip_source_first_line; |
| wchar_t *run_command; |
| wchar_t *run_module; |
| wchar_t *run_filename; |
|
|
| |
|
|
| |
| |
| int _install_importlib; |
|
|
| |
| int _init_main; |
|
|
| |
| |
| int _isolated_interpreter; |
|
|
| |
| int _is_python_build; |
| } PyConfig; |
|
|
| PyAPI_FUNC(void) PyConfig_InitPythonConfig(PyConfig *config); |
| PyAPI_FUNC(void) PyConfig_InitIsolatedConfig(PyConfig *config); |
| PyAPI_FUNC(void) PyConfig_Clear(PyConfig *); |
| PyAPI_FUNC(PyStatus) PyConfig_SetString( |
| PyConfig *config, |
| wchar_t **config_str, |
| const wchar_t *str); |
| PyAPI_FUNC(PyStatus) PyConfig_SetBytesString( |
| PyConfig *config, |
| wchar_t **config_str, |
| const char *str); |
| PyAPI_FUNC(PyStatus) PyConfig_Read(PyConfig *config); |
| PyAPI_FUNC(PyStatus) PyConfig_SetBytesArgv( |
| PyConfig *config, |
| Py_ssize_t argc, |
| char * const *argv); |
| PyAPI_FUNC(PyStatus) PyConfig_SetArgv(PyConfig *config, |
| Py_ssize_t argc, |
| wchar_t * const *argv); |
| PyAPI_FUNC(PyStatus) PyConfig_SetWideStringList(PyConfig *config, |
| PyWideStringList *list, |
| Py_ssize_t length, wchar_t **items); |
|
|
|
|
| |
|
|
| |
| |
| |
| PyAPI_FUNC(void) Py_GetArgcArgv(int *argc, wchar_t ***argv); |
|
|
| #ifdef __cplusplus |
| } |
| #endif |
| #endif |
| #endif |
|
|