blob: dd5ca6121cac2c90a9ad83ddffe95834614ea913 [file] [log] [blame]
Victor Stinner6c785c02018-08-01 17:56:14 +02001#ifndef Py_PYCORECONFIG_H
2#define Py_PYCORECONFIG_H
Victor Stinnerf684d832019-03-01 03:44:13 +01003#ifndef Py_LIMITED_API
Victor Stinner6c785c02018-08-01 17:56:14 +02004
Victor Stinner331a6a52019-05-27 16:39:22 +02005/* --- PyStatus ----------------------------------------------- */
Victor Stinner6c785c02018-08-01 17:56:14 +02006
Victor Stinner6c785c02018-08-01 17:56:14 +02007typedef struct {
Victor Stinnerdb719752019-05-01 05:35:33 +02008 enum {
Victor Stinner331a6a52019-05-27 16:39:22 +02009 _PyStatus_TYPE_OK=0,
10 _PyStatus_TYPE_ERROR=1,
11 _PyStatus_TYPE_EXIT=2
Victor Stinnerdb719752019-05-01 05:35:33 +020012 } _type;
Victor Stinner331a6a52019-05-27 16:39:22 +020013 const char *func;
Victor Stinnerdb719752019-05-01 05:35:33 +020014 const char *err_msg;
Victor Stinnerdfe88472019-03-01 12:14:41 +010015 int exitcode;
Victor Stinner331a6a52019-05-27 16:39:22 +020016} PyStatus;
Victor Stinner6c785c02018-08-01 17:56:14 +020017
Victor Stinner331a6a52019-05-27 16:39:22 +020018PyAPI_FUNC(PyStatus) PyStatus_Ok(void);
19PyAPI_FUNC(PyStatus) PyStatus_Error(const char *err_msg);
20PyAPI_FUNC(PyStatus) PyStatus_NoMemory(void);
21PyAPI_FUNC(PyStatus) PyStatus_Exit(int exitcode);
22PyAPI_FUNC(int) PyStatus_IsError(PyStatus err);
23PyAPI_FUNC(int) PyStatus_IsExit(PyStatus err);
24PyAPI_FUNC(int) PyStatus_Exception(PyStatus err);
Victor Stinner6c785c02018-08-01 17:56:14 +020025
Victor Stinner331a6a52019-05-27 16:39:22 +020026/* --- PyWideStringList ------------------------------------------------ */
Victor Stinner74f65682019-03-15 15:08:05 +010027
28typedef struct {
29 /* If length is greater than zero, items must be non-NULL
30 and all items strings must be non-NULL */
31 Py_ssize_t length;
32 wchar_t **items;
Victor Stinner331a6a52019-05-27 16:39:22 +020033} PyWideStringList;
34
35PyAPI_FUNC(PyStatus) PyWideStringList_Append(PyWideStringList *list,
36 const wchar_t *item);
Victor Stinner3842f292019-08-23 16:57:54 +010037PyAPI_FUNC(PyStatus) PyWideStringList_Insert(PyWideStringList *list,
38 Py_ssize_t index,
39 const wchar_t *item);
Victor Stinner74f65682019-03-15 15:08:05 +010040
Victor Stinner74f65682019-03-15 15:08:05 +010041
Victor Stinner331a6a52019-05-27 16:39:22 +020042/* --- PyPreConfig ----------------------------------------------- */
Victor Stinner022be022019-05-22 23:58:50 +020043
Victor Stinner6c785c02018-08-01 17:56:14 +020044typedef struct {
Victor Stinner022be022019-05-22 23:58:50 +020045 int _config_init; /* _PyConfigInitEnum value */
Victor Stinner373893c2019-05-02 14:46:29 -040046
Victor Stinner331a6a52019-05-27 16:39:22 +020047 /* Parse Py_PreInitializeFromBytesArgs() arguments?
48 See PyConfig.parse_argv */
Victor Stinner6d1c4672019-05-20 11:02:00 +020049 int parse_argv;
50
Victor Stinnercad1f742019-03-05 02:01:27 +010051 /* If greater than 0, enable isolated mode: sys.path contains
52 neither the script's directory nor the user's site-packages directory.
53
54 Set to 1 by the -I command line option. If set to -1 (default), inherit
55 Py_IsolatedFlag value. */
56 int isolated;
Victor Stinner6c785c02018-08-01 17:56:14 +020057
58 /* If greater than 0: use environment variables.
59 Set to 0 by -E command line option. If set to -1 (default), it is
60 set to !Py_IgnoreEnvironmentFlag. */
61 int use_environment;
Victor Stinner5a02e0d2019-03-05 12:32:09 +010062
Victor Stinnerbcfbbd72019-05-17 22:44:16 +020063 /* Set the LC_CTYPE locale to the user preferred locale? If equals to 0,
64 set coerce_c_locale and coerce_c_locale_warn to 0. */
65 int configure_locale;
66
Victor Stinnerd929f182019-03-27 18:28:46 +010067 /* Coerce the LC_CTYPE locale if it's equal to "C"? (PEP 538)
68
69 Set to 0 by PYTHONCOERCECLOCALE=0. Set to 1 by PYTHONCOERCECLOCALE=1.
70 Set to 2 if the user preferred LC_CTYPE locale is "C".
Victor Stinnerf72346c2019-03-25 17:54:58 +010071
MandarJKulkarni33ce3f02019-05-29 04:25:05 +053072 If it is equal to 1, LC_CTYPE locale is read to decide if it should be
Victor Stinnerf72346c2019-03-25 17:54:58 +010073 coerced or not (ex: PYTHONCOERCECLOCALE=1). Internally, it is set to 2
Victor Stinnercab5d072019-05-17 19:01:14 +020074 if the LC_CTYPE locale must be coerced.
75
MandarJKulkarni33ce3f02019-05-29 04:25:05 +053076 Disable by default (set to 0). Set it to -1 to let Python decide if it
Victor Stinnercab5d072019-05-17 19:01:14 +020077 should be enabled or not. */
Victor Stinnerf72346c2019-03-25 17:54:58 +010078 int coerce_c_locale;
Victor Stinnerd929f182019-03-27 18:28:46 +010079
80 /* Emit a warning if the LC_CTYPE locale is coerced?
81
Victor Stinnercab5d072019-05-17 19:01:14 +020082 Set to 1 by PYTHONCOERCECLOCALE=warn.
83
MandarJKulkarni33ce3f02019-05-29 04:25:05 +053084 Disable by default (set to 0). Set it to -1 to let Python decide if it
Victor Stinnercab5d072019-05-17 19:01:14 +020085 should be enabled or not. */
Victor Stinnerd929f182019-03-27 18:28:46 +010086 int coerce_c_locale_warn;
Victor Stinner5a02e0d2019-03-05 12:32:09 +010087
88#ifdef MS_WINDOWS
89 /* If greater than 1, use the "mbcs" encoding instead of the UTF-8
90 encoding for the filesystem encoding.
91
92 Set to 1 if the PYTHONLEGACYWINDOWSFSENCODING environment variable is
93 set to a non-empty string. If set to -1 (default), inherit
94 Py_LegacyWindowsFSEncodingFlag value.
95
96 See PEP 529 for more details. */
97 int legacy_windows_fs_encoding;
98#endif
99
Victor Stinnerd929f182019-03-27 18:28:46 +0100100 /* Enable UTF-8 mode? (PEP 540)
101
102 Disabled by default (equals to 0).
103
104 Set to 1 by "-X utf8" and "-X utf8=1" command line options.
105 Set to 1 by PYTHONUTF8=1 environment variable.
106
107 Set to 0 by "-X utf8=0" and PYTHONUTF8=0.
108
109 If equals to -1, it is set to 1 if the LC_CTYPE locale is "C" or
Victor Stinner022be022019-05-22 23:58:50 +0200110 "POSIX", otherwise it is set to 0. Inherit Py_UTF8Mode value value. */
Victor Stinner5a02e0d2019-03-05 12:32:09 +0100111 int utf8_mode;
Victor Stinnerb35be4b2019-03-05 17:37:44 +0100112
Victor Stinnerb9783d22020-01-24 10:22:18 +0100113 /* If non-zero, enable the Python Development Mode.
114
115 Set to 1 by the -X dev command line option. Set by the PYTHONDEVMODE
116 environment variable. */
117 int dev_mode;
Victor Stinnerb16b4e42019-05-17 15:20:52 +0200118
Victor Stinner6d1c4672019-05-20 11:02:00 +0200119 /* Memory allocator: PYTHONMALLOC env var.
120 See PyMemAllocatorName for valid values. */
121 int allocator;
Victor Stinner331a6a52019-05-27 16:39:22 +0200122} PyPreConfig;
Victor Stinnercad1f742019-03-05 02:01:27 +0100123
Victor Stinner3c30a762019-10-01 10:56:37 +0200124PyAPI_FUNC(void) PyPreConfig_InitPythonConfig(PyPreConfig *config);
125PyAPI_FUNC(void) PyPreConfig_InitIsolatedConfig(PyPreConfig *config);
Victor Stinnercab5d072019-05-17 19:01:14 +0200126
Victor Stinnercad1f742019-03-05 02:01:27 +0100127
Victor Stinner331a6a52019-05-27 16:39:22 +0200128/* --- PyConfig ---------------------------------------------- */
Victor Stinnercad1f742019-03-05 02:01:27 +0100129
130typedef struct {
Victor Stinner022be022019-05-22 23:58:50 +0200131 int _config_init; /* _PyConfigInitEnum value */
Victor Stinner373893c2019-05-02 14:46:29 -0400132
Victor Stinner331a6a52019-05-27 16:39:22 +0200133 int isolated; /* Isolated mode? see PyPreConfig.isolated */
134 int use_environment; /* Use environment variables? see PyPreConfig.use_environment */
Victor Stinnerb9783d22020-01-24 10:22:18 +0100135 int dev_mode; /* Python Development Mode? See PyPreConfig.dev_mode */
Victor Stinnercad1f742019-03-05 02:01:27 +0100136
137 /* Install signal handlers? Yes by default. */
138 int install_signal_handlers;
Victor Stinner6c785c02018-08-01 17:56:14 +0200139
140 int use_hash_seed; /* PYTHONHASHSEED=x */
141 unsigned long hash_seed;
142
Victor Stinner6c785c02018-08-01 17:56:14 +0200143 /* Enable faulthandler?
144 Set to 1 by -X faulthandler and PYTHONFAULTHANDLER. -1 means unset. */
145 int faulthandler;
146
147 /* Enable tracemalloc?
148 Set by -X tracemalloc=N and PYTHONTRACEMALLOC. -1 means unset */
149 int tracemalloc;
150
151 int import_time; /* PYTHONPROFILEIMPORTTIME, -X importtime */
152 int show_ref_count; /* -X showrefcount */
Victor Stinner6c785c02018-08-01 17:56:14 +0200153 int dump_refs; /* PYTHONDUMPREFS */
154 int malloc_stats; /* PYTHONMALLOCSTATS */
Victor Stinner6c785c02018-08-01 17:56:14 +0200155
Victor Stinnerde427552018-08-29 23:26:55 +0200156 /* Python filesystem encoding and error handler:
Victor Stinnerb2457ef2018-08-29 13:25:36 +0200157 sys.getfilesystemencoding() and sys.getfilesystemencodeerrors().
158
Victor Stinnere662c392020-11-01 23:07:23 +0100159 The Doc/c-api/init_config.rst documentation explains how Python selects
160 the filesystem encoding and error handler.
Victor Stinnerde427552018-08-29 23:26:55 +0200161
Victor Stinnere662c392020-11-01 23:07:23 +0100162 _PyUnicode_InitEncodings() updates the encoding name to the Python codec
163 name. For example, "ANSI_X3.4-1968" is replaced with "ascii". It also
164 sets Py_FileSystemDefaultEncoding to filesystem_encoding and
165 sets Py_FileSystemDefaultEncodeErrors to filesystem_errors. */
Victor Stinner709d23d2019-05-02 14:56:30 -0400166 wchar_t *filesystem_encoding;
167 wchar_t *filesystem_errors;
Victor Stinnerb2457ef2018-08-29 13:25:36 +0200168
Victor Stinner74f65682019-03-15 15:08:05 +0100169 wchar_t *pycache_prefix; /* PYTHONPYCACHEPREFIX, -X pycache_prefix=PATH */
Victor Stinnerae239f62019-05-16 17:02:56 +0200170 int parse_argv; /* Parse argv command line arguments? */
171
172 /* Command line arguments (sys.argv).
173
Victor Stinnercab5d072019-05-17 19:01:14 +0200174 Set parse_argv to 1 to parse argv as Python command line arguments
175 and then strip Python arguments from argv.
Victor Stinnerae239f62019-05-16 17:02:56 +0200176
177 If argv is empty, an empty string is added to ensure that sys.argv
178 always exists and is never empty. */
Victor Stinner331a6a52019-05-27 16:39:22 +0200179 PyWideStringList argv;
Victor Stinnerae239f62019-05-16 17:02:56 +0200180
Victor Stinnerfed02e12019-05-17 11:12:09 +0200181 /* Program name:
182
183 - If Py_SetProgramName() was called, use its value.
184 - On macOS, use PYTHONEXECUTABLE environment variable if set.
185 - If WITH_NEXT_FRAMEWORK macro is defined, use __PYVENV_LAUNCHER__
186 environment variable is set.
187 - Use argv[0] if available and non-empty.
188 - Use "python" on Windows, or "python3 on other platforms. */
189 wchar_t *program_name;
Victor Stinnerae239f62019-05-16 17:02:56 +0200190
Victor Stinner331a6a52019-05-27 16:39:22 +0200191 PyWideStringList xoptions; /* Command line -X options */
Victor Stinnerfb4ae152019-09-30 01:40:17 +0200192
193 /* Warnings options: lowest to highest priority. warnings.filters
194 is built in the reverse order (highest to lowest priority). */
195 PyWideStringList warnoptions;
Victor Stinner6c785c02018-08-01 17:56:14 +0200196
Victor Stinner6c785c02018-08-01 17:56:14 +0200197 /* If equal to zero, disable the import of the module site and the
198 site-dependent manipulations of sys.path that it entails. Also disable
199 these manipulations if site is explicitly imported later (call
200 site.main() if you want them to be triggered).
201
202 Set to 0 by the -S command line option. If set to -1 (default), it is
203 set to !Py_NoSiteFlag. */
204 int site_import;
205
206 /* Bytes warnings:
207
208 * If equal to 1, issue a warning when comparing bytes or bytearray with
209 str or bytes with int.
210 * If equal or greater to 2, issue an error.
211
212 Incremented by the -b command line option. If set to -1 (default), inherit
213 Py_BytesWarningFlag value. */
214 int bytes_warning;
215
216 /* If greater than 0, enable inspect: when a script is passed as first
217 argument or the -c option is used, enter interactive mode after
218 executing the script or the command, even when sys.stdin does not appear
219 to be a terminal.
220
221 Incremented by the -i command line option. Set to 1 if the PYTHONINSPECT
222 environment variable is non-empty. If set to -1 (default), inherit
223 Py_InspectFlag value. */
224 int inspect;
225
226 /* If greater than 0: enable the interactive mode (REPL).
227
228 Incremented by the -i command line option. If set to -1 (default),
229 inherit Py_InteractiveFlag value. */
230 int interactive;
231
232 /* Optimization level.
233
234 Incremented by the -O command line option. Set by the PYTHONOPTIMIZE
235 environment variable. If set to -1 (default), inherit Py_OptimizeFlag
236 value. */
237 int optimization_level;
238
239 /* If greater than 0, enable the debug mode: turn on parser debugging
240 output (for expert only, depending on compilation options).
241
242 Incremented by the -d command line option. Set by the PYTHONDEBUG
243 environment variable. If set to -1 (default), inherit Py_DebugFlag
244 value. */
245 int parser_debug;
246
247 /* If equal to 0, Python won't try to write ``.pyc`` files on the
248 import of source modules.
249
250 Set to 0 by the -B command line option and the PYTHONDONTWRITEBYTECODE
251 environment variable. If set to -1 (default), it is set to
252 !Py_DontWriteBytecodeFlag. */
253 int write_bytecode;
254
255 /* If greater than 0, enable the verbose mode: print a message each time a
256 module is initialized, showing the place (filename or built-in module)
257 from which it is loaded.
258
259 If greater or equal to 2, print a message for each file that is checked
260 for when searching for a module. Also provides information on module
261 cleanup at exit.
262
263 Incremented by the -v option. Set by the PYTHONVERBOSE environment
264 variable. If set to -1 (default), inherit Py_VerboseFlag value. */
265 int verbose;
266
267 /* If greater than 0, enable the quiet mode: Don't display the copyright
268 and version messages even in interactive mode.
269
270 Incremented by the -q option. If set to -1 (default), inherit
271 Py_QuietFlag value. */
272 int quiet;
273
274 /* If greater than 0, don't add the user site-packages directory to
275 sys.path.
276
277 Set to 0 by the -s and -I command line options , and the PYTHONNOUSERSITE
278 environment variable. If set to -1 (default), it is set to
279 !Py_NoUserSiteDirectory. */
280 int user_site_directory;
281
Victor Stinner54b43bb2019-05-16 18:30:15 +0200282 /* If non-zero, configure C standard steams (stdio, stdout,
283 stderr):
284
285 - Set O_BINARY mode on Windows.
286 - If buffered_stdio is equal to zero, make streams unbuffered.
287 Otherwise, enable streams buffering if interactive is non-zero. */
288 int configure_c_stdio;
289
Victor Stinner6c785c02018-08-01 17:56:14 +0200290 /* If equal to 0, enable unbuffered mode: force the stdout and stderr
291 streams to be unbuffered.
292
293 Set to 0 by the -u option. Set by the PYTHONUNBUFFERED environment
294 variable.
295 If set to -1 (default), it is set to !Py_UnbufferedStdioFlag. */
296 int buffered_stdio;
297
Victor Stinnerdfe0dc72018-08-29 11:47:29 +0200298 /* Encoding of sys.stdin, sys.stdout and sys.stderr.
299 Value set from PYTHONIOENCODING environment variable and
300 Py_SetStandardStreamEncoding() function.
301 See also 'stdio_errors' attribute. */
Victor Stinner709d23d2019-05-02 14:56:30 -0400302 wchar_t *stdio_encoding;
Victor Stinnerdfe0dc72018-08-29 11:47:29 +0200303
304 /* Error handler of sys.stdin and sys.stdout.
305 Value set from PYTHONIOENCODING environment variable and
306 Py_SetStandardStreamEncoding() function.
307 See also 'stdio_encoding' attribute. */
Victor Stinner709d23d2019-05-02 14:56:30 -0400308 wchar_t *stdio_errors;
Victor Stinnerdfe0dc72018-08-29 11:47:29 +0200309
Victor Stinner6c785c02018-08-01 17:56:14 +0200310#ifdef MS_WINDOWS
Victor Stinner6c785c02018-08-01 17:56:14 +0200311 /* If greater than zero, use io.FileIO instead of WindowsConsoleIO for sys
312 standard streams.
313
314 Set to 1 if the PYTHONLEGACYWINDOWSSTDIO environment variable is set to
315 a non-empty string. If set to -1 (default), inherit
316 Py_LegacyWindowsStdioFlag value.
317
318 See PEP 528 for more details. */
319 int legacy_windows_stdio;
320#endif
321
Victor Stinner331a6a52019-05-27 16:39:22 +0200322 /* Value of the --check-hash-based-pycs command line option:
323
324 - "default" means the 'check_source' flag in hash-based pycs
325 determines invalidation
326 - "always" causes the interpreter to hash the source file for
327 invalidation regardless of value of 'check_source' bit
328 - "never" causes the interpreter to always assume hash-based pycs are
329 valid
330
331 The default value is "default".
332
333 See PEP 552 "Deterministic pycs" for more details. */
334 wchar_t *check_hash_pycs_mode;
335
Victor Stinnerae239f62019-05-16 17:02:56 +0200336 /* --- Path configuration inputs ------------ */
337
Victor Stinner331a6a52019-05-27 16:39:22 +0200338 /* If greater than 0, suppress _PyPathConfig_Calculate() warnings on Unix.
339 The parameter has no effect on Windows.
340
341 If set to -1 (default), inherit !Py_FrozenFlag value. */
342 int pathconfig_warnings;
343
344 wchar_t *pythonpath_env; /* PYTHONPATH environment variable */
Victor Stinnerae239f62019-05-16 17:02:56 +0200345 wchar_t *home; /* PYTHONHOME environment variable,
346 see also Py_SetPythonHome(). */
347
348 /* --- Path configuration outputs ----------- */
349
Victor Stinner331a6a52019-05-27 16:39:22 +0200350 int module_search_paths_set; /* If non-zero, use module_search_paths */
351 PyWideStringList module_search_paths; /* sys.path paths. Computed if
352 module_search_paths_set is equal
Victor Stinnerae239f62019-05-16 17:02:56 +0200353 to zero. */
354
Steve Dower9048c492019-06-29 10:34:11 -0700355 wchar_t *executable; /* sys.executable */
356 wchar_t *base_executable; /* sys._base_executable */
357 wchar_t *prefix; /* sys.prefix */
358 wchar_t *base_prefix; /* sys.base_prefix */
359 wchar_t *exec_prefix; /* sys.exec_prefix */
Victor Stinnerae239f62019-05-16 17:02:56 +0200360 wchar_t *base_exec_prefix; /* sys.base_exec_prefix */
Sandro Mani8f023a22020-06-08 17:28:11 +0200361 wchar_t *platlibdir; /* sys.platlibdir */
Victor Stinnerae239f62019-05-16 17:02:56 +0200362
Victor Stinner62be7632019-03-01 13:10:14 +0100363 /* --- Parameter only used by Py_Main() ---------- */
364
365 /* Skip the first line of the source ('run_filename' parameter), allowing use of non-Unix forms of
366 "#!cmd". This is intended for a DOS specific hack only.
367
368 Set by the -x command line option. */
369 int skip_source_first_line;
370
371 wchar_t *run_command; /* -c command line argument */
372 wchar_t *run_module; /* -m command line argument */
373 wchar_t *run_filename; /* Trailing command line argument without -c or -m */
374
375 /* --- Private fields ---------------------------- */
Victor Stinner6c785c02018-08-01 17:56:14 +0200376
377 /* Install importlib? If set to 0, importlib is not initialized at all.
378 Needed by freeze_importlib. */
379 int _install_importlib;
380
Victor Stinner9ef5dca2019-05-16 17:38:16 +0200381 /* If equal to 0, stop Python initialization before the "main" phase */
382 int _init_main;
Victor Stinner252346a2020-05-01 11:33:44 +0200383
384 /* If non-zero, disallow threads, subprocesses, and fork.
385 Default: 0. */
386 int _isolated_interpreter;
Victor Stinnere81f6e62020-06-08 18:12:59 +0200387
Victor Stinnerdd8a93e2020-06-30 00:49:03 +0200388 /* The list of the original command line arguments passed to the Python
389 executable.
390
391 If 'orig_argv' list is empty and 'argv' is not a list only containing an
392 empty string, PyConfig_Read() copies 'argv' into 'orig_argv' before
393 modifying 'argv' (if 'parse_argv is non-zero).
Victor Stinnere81f6e62020-06-08 18:12:59 +0200394
395 _PyConfig_Write() initializes Py_GetArgcArgv() to this list. */
Victor Stinnerdd8a93e2020-06-30 00:49:03 +0200396 PyWideStringList orig_argv;
Victor Stinner331a6a52019-05-27 16:39:22 +0200397} PyConfig;
Victor Stinner6c785c02018-08-01 17:56:14 +0200398
Victor Stinner8462a492019-10-01 12:06:16 +0200399PyAPI_FUNC(void) PyConfig_InitPythonConfig(PyConfig *config);
400PyAPI_FUNC(void) PyConfig_InitIsolatedConfig(PyConfig *config);
Victor Stinner331a6a52019-05-27 16:39:22 +0200401PyAPI_FUNC(void) PyConfig_Clear(PyConfig *);
402PyAPI_FUNC(PyStatus) PyConfig_SetString(
403 PyConfig *config,
Victor Stinnerbab0db62019-05-18 03:21:27 +0200404 wchar_t **config_str,
405 const wchar_t *str);
Victor Stinner331a6a52019-05-27 16:39:22 +0200406PyAPI_FUNC(PyStatus) PyConfig_SetBytesString(
407 PyConfig *config,
Victor Stinnerbab0db62019-05-18 03:21:27 +0200408 wchar_t **config_str,
409 const char *str);
Victor Stinner331a6a52019-05-27 16:39:22 +0200410PyAPI_FUNC(PyStatus) PyConfig_Read(PyConfig *config);
411PyAPI_FUNC(PyStatus) PyConfig_SetBytesArgv(
412 PyConfig *config,
Victor Stinnerbab0db62019-05-18 03:21:27 +0200413 Py_ssize_t argc,
Victor Stinner6d1c4672019-05-20 11:02:00 +0200414 char * const *argv);
Victor Stinner331a6a52019-05-27 16:39:22 +0200415PyAPI_FUNC(PyStatus) PyConfig_SetArgv(PyConfig *config,
Victor Stinnerbab0db62019-05-18 03:21:27 +0200416 Py_ssize_t argc,
Victor Stinner6d1c4672019-05-20 11:02:00 +0200417 wchar_t * const *argv);
Victor Stinner36242fd2019-07-01 19:13:50 +0200418PyAPI_FUNC(PyStatus) PyConfig_SetWideStringList(PyConfig *config,
419 PyWideStringList *list,
420 Py_ssize_t length, wchar_t **items);
Victor Stinnercab5d072019-05-17 19:01:14 +0200421
Victor Stinnere81f6e62020-06-08 18:12:59 +0200422
423/* --- Helper functions --------------------------------------- */
424
425/* Get the original command line arguments, before Python modified them.
426
Victor Stinnerdd8a93e2020-06-30 00:49:03 +0200427 See also PyConfig.orig_argv. */
Victor Stinnere81f6e62020-06-08 18:12:59 +0200428PyAPI_FUNC(void) Py_GetArgcArgv(int *argc, wchar_t ***argv);
429
Victor Stinnerf684d832019-03-01 03:44:13 +0100430#endif /* !Py_LIMITED_API */
Victor Stinner6c785c02018-08-01 17:56:14 +0200431#endif /* !Py_PYCORECONFIG_H */