blob: d5effb8397fc5be39d9849066c11c33695de3548 [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#ifdef __cplusplus
5extern "C" {
6#endif
7
Victor Stinner331a6a52019-05-27 16:39:22 +02008/* --- PyStatus ----------------------------------------------- */
Victor Stinner6c785c02018-08-01 17:56:14 +02009
Victor Stinner6c785c02018-08-01 17:56:14 +020010typedef struct {
Victor Stinnerdb719752019-05-01 05:35:33 +020011 enum {
Victor Stinner331a6a52019-05-27 16:39:22 +020012 _PyStatus_TYPE_OK=0,
13 _PyStatus_TYPE_ERROR=1,
14 _PyStatus_TYPE_EXIT=2
Victor Stinnerdb719752019-05-01 05:35:33 +020015 } _type;
Victor Stinner331a6a52019-05-27 16:39:22 +020016 const char *func;
Victor Stinnerdb719752019-05-01 05:35:33 +020017 const char *err_msg;
Victor Stinnerdfe88472019-03-01 12:14:41 +010018 int exitcode;
Victor Stinner331a6a52019-05-27 16:39:22 +020019} PyStatus;
Victor Stinner6c785c02018-08-01 17:56:14 +020020
Victor Stinner331a6a52019-05-27 16:39:22 +020021PyAPI_FUNC(PyStatus) PyStatus_Ok(void);
22PyAPI_FUNC(PyStatus) PyStatus_Error(const char *err_msg);
23PyAPI_FUNC(PyStatus) PyStatus_NoMemory(void);
24PyAPI_FUNC(PyStatus) PyStatus_Exit(int exitcode);
25PyAPI_FUNC(int) PyStatus_IsError(PyStatus err);
26PyAPI_FUNC(int) PyStatus_IsExit(PyStatus err);
27PyAPI_FUNC(int) PyStatus_Exception(PyStatus err);
Victor Stinner6c785c02018-08-01 17:56:14 +020028
Victor Stinner331a6a52019-05-27 16:39:22 +020029/* --- PyWideStringList ------------------------------------------------ */
Victor Stinner74f65682019-03-15 15:08:05 +010030
31typedef struct {
32 /* If length is greater than zero, items must be non-NULL
33 and all items strings must be non-NULL */
34 Py_ssize_t length;
35 wchar_t **items;
Victor Stinner331a6a52019-05-27 16:39:22 +020036} PyWideStringList;
37
38PyAPI_FUNC(PyStatus) PyWideStringList_Append(PyWideStringList *list,
39 const wchar_t *item);
Victor Stinner3842f292019-08-23 16:57:54 +010040PyAPI_FUNC(PyStatus) PyWideStringList_Insert(PyWideStringList *list,
41 Py_ssize_t index,
42 const wchar_t *item);
Victor Stinner74f65682019-03-15 15:08:05 +010043
Victor Stinner74f65682019-03-15 15:08:05 +010044
Victor Stinner331a6a52019-05-27 16:39:22 +020045/* --- PyPreConfig ----------------------------------------------- */
Victor Stinner022be022019-05-22 23:58:50 +020046
Victor Stinner6c785c02018-08-01 17:56:14 +020047typedef struct {
Victor Stinner441b10c2019-09-28 04:28:35 +020048 /* Size of the structure in bytes: must be initialized to
49 sizeof(PyPreConfig). Field used for API and ABI compatibility. */
50 size_t struct_size;
51
Victor Stinner022be022019-05-22 23:58:50 +020052 int _config_init; /* _PyConfigInitEnum value */
Victor Stinner373893c2019-05-02 14:46:29 -040053
Victor Stinner331a6a52019-05-27 16:39:22 +020054 /* Parse Py_PreInitializeFromBytesArgs() arguments?
55 See PyConfig.parse_argv */
Victor Stinner6d1c4672019-05-20 11:02:00 +020056 int parse_argv;
57
Victor Stinnercad1f742019-03-05 02:01:27 +010058 /* If greater than 0, enable isolated mode: sys.path contains
59 neither the script's directory nor the user's site-packages directory.
60
61 Set to 1 by the -I command line option. If set to -1 (default), inherit
62 Py_IsolatedFlag value. */
63 int isolated;
Victor Stinner6c785c02018-08-01 17:56:14 +020064
65 /* If greater than 0: use environment variables.
66 Set to 0 by -E command line option. If set to -1 (default), it is
67 set to !Py_IgnoreEnvironmentFlag. */
68 int use_environment;
Victor Stinner5a02e0d2019-03-05 12:32:09 +010069
Victor Stinnerbcfbbd72019-05-17 22:44:16 +020070 /* Set the LC_CTYPE locale to the user preferred locale? If equals to 0,
71 set coerce_c_locale and coerce_c_locale_warn to 0. */
72 int configure_locale;
73
Victor Stinnerd929f182019-03-27 18:28:46 +010074 /* Coerce the LC_CTYPE locale if it's equal to "C"? (PEP 538)
75
76 Set to 0 by PYTHONCOERCECLOCALE=0. Set to 1 by PYTHONCOERCECLOCALE=1.
77 Set to 2 if the user preferred LC_CTYPE locale is "C".
Victor Stinnerf72346c2019-03-25 17:54:58 +010078
MandarJKulkarni33ce3f02019-05-29 04:25:05 +053079 If it is equal to 1, LC_CTYPE locale is read to decide if it should be
Victor Stinnerf72346c2019-03-25 17:54:58 +010080 coerced or not (ex: PYTHONCOERCECLOCALE=1). Internally, it is set to 2
Victor Stinnercab5d072019-05-17 19:01:14 +020081 if the LC_CTYPE locale must be coerced.
82
MandarJKulkarni33ce3f02019-05-29 04:25:05 +053083 Disable by default (set to 0). Set it to -1 to let Python decide if it
Victor Stinnercab5d072019-05-17 19:01:14 +020084 should be enabled or not. */
Victor Stinnerf72346c2019-03-25 17:54:58 +010085 int coerce_c_locale;
Victor Stinnerd929f182019-03-27 18:28:46 +010086
87 /* Emit a warning if the LC_CTYPE locale is coerced?
88
Victor Stinnercab5d072019-05-17 19:01:14 +020089 Set to 1 by PYTHONCOERCECLOCALE=warn.
90
MandarJKulkarni33ce3f02019-05-29 04:25:05 +053091 Disable by default (set to 0). Set it to -1 to let Python decide if it
Victor Stinnercab5d072019-05-17 19:01:14 +020092 should be enabled or not. */
Victor Stinnerd929f182019-03-27 18:28:46 +010093 int coerce_c_locale_warn;
Victor Stinner5a02e0d2019-03-05 12:32:09 +010094
95#ifdef MS_WINDOWS
96 /* If greater than 1, use the "mbcs" encoding instead of the UTF-8
97 encoding for the filesystem encoding.
98
99 Set to 1 if the PYTHONLEGACYWINDOWSFSENCODING environment variable is
100 set to a non-empty string. If set to -1 (default), inherit
101 Py_LegacyWindowsFSEncodingFlag value.
102
103 See PEP 529 for more details. */
104 int legacy_windows_fs_encoding;
105#endif
106
Victor Stinnerd929f182019-03-27 18:28:46 +0100107 /* Enable UTF-8 mode? (PEP 540)
108
109 Disabled by default (equals to 0).
110
111 Set to 1 by "-X utf8" and "-X utf8=1" command line options.
112 Set to 1 by PYTHONUTF8=1 environment variable.
113
114 Set to 0 by "-X utf8=0" and PYTHONUTF8=0.
115
116 If equals to -1, it is set to 1 if the LC_CTYPE locale is "C" or
Victor Stinner022be022019-05-22 23:58:50 +0200117 "POSIX", otherwise it is set to 0. Inherit Py_UTF8Mode value value. */
Victor Stinner5a02e0d2019-03-05 12:32:09 +0100118 int utf8_mode;
Victor Stinnerb35be4b2019-03-05 17:37:44 +0100119
120 int dev_mode; /* Development mode. PYTHONDEVMODE, -X dev */
Victor Stinnerb16b4e42019-05-17 15:20:52 +0200121
Victor Stinner6d1c4672019-05-20 11:02:00 +0200122 /* Memory allocator: PYTHONMALLOC env var.
123 See PyMemAllocatorName for valid values. */
124 int allocator;
Victor Stinner331a6a52019-05-27 16:39:22 +0200125} PyPreConfig;
Victor Stinnercad1f742019-03-05 02:01:27 +0100126
Victor Stinner441b10c2019-09-28 04:28:35 +0200127PyAPI_FUNC(PyStatus) PyPreConfig_InitPythonConfig(PyPreConfig *config);
128PyAPI_FUNC(PyStatus) PyPreConfig_InitIsolatedConfig(PyPreConfig *config);
Victor Stinnercab5d072019-05-17 19:01:14 +0200129
Victor Stinnercad1f742019-03-05 02:01:27 +0100130
Victor Stinner331a6a52019-05-27 16:39:22 +0200131/* --- PyConfig ---------------------------------------------- */
Victor Stinnercad1f742019-03-05 02:01:27 +0100132
133typedef struct {
Victor Stinner441b10c2019-09-28 04:28:35 +0200134 /* Size of the structure in bytes: must be initialized to
135 sizeof(PyConfig). Field used for API and ABI compatibility. */
136 size_t struct_size;
137
Victor Stinner022be022019-05-22 23:58:50 +0200138 int _config_init; /* _PyConfigInitEnum value */
Victor Stinner373893c2019-05-02 14:46:29 -0400139
Victor Stinner331a6a52019-05-27 16:39:22 +0200140 int isolated; /* Isolated mode? see PyPreConfig.isolated */
141 int use_environment; /* Use environment variables? see PyPreConfig.use_environment */
142 int dev_mode; /* Development mode? See PyPreConfig.dev_mode */
Victor Stinnercad1f742019-03-05 02:01:27 +0100143
144 /* Install signal handlers? Yes by default. */
145 int install_signal_handlers;
Victor Stinner6c785c02018-08-01 17:56:14 +0200146
147 int use_hash_seed; /* PYTHONHASHSEED=x */
148 unsigned long hash_seed;
149
Victor Stinner6c785c02018-08-01 17:56:14 +0200150 /* Enable faulthandler?
151 Set to 1 by -X faulthandler and PYTHONFAULTHANDLER. -1 means unset. */
152 int faulthandler;
153
154 /* Enable tracemalloc?
155 Set by -X tracemalloc=N and PYTHONTRACEMALLOC. -1 means unset */
156 int tracemalloc;
157
158 int import_time; /* PYTHONPROFILEIMPORTTIME, -X importtime */
159 int show_ref_count; /* -X showrefcount */
160 int show_alloc_count; /* -X showalloccount */
161 int dump_refs; /* PYTHONDUMPREFS */
162 int malloc_stats; /* PYTHONMALLOCSTATS */
Victor Stinner6c785c02018-08-01 17:56:14 +0200163
Victor Stinnerde427552018-08-29 23:26:55 +0200164 /* Python filesystem encoding and error handler:
Victor Stinnerb2457ef2018-08-29 13:25:36 +0200165 sys.getfilesystemencoding() and sys.getfilesystemencodeerrors().
166
Victor Stinnerde427552018-08-29 23:26:55 +0200167 Default encoding and error handler:
168
169 * if Py_SetStandardStreamEncoding() has been called: they have the
170 highest priority;
171 * PYTHONIOENCODING environment variable;
172 * The UTF-8 Mode uses UTF-8/surrogateescape;
Victor Stinner905f1ac2018-10-30 12:58:10 +0100173 * If Python forces the usage of the ASCII encoding (ex: C locale
174 or POSIX locale on FreeBSD or HP-UX), use ASCII/surrogateescape;
pxinwrf4b0a1c2019-03-04 17:02:06 +0800175 * locale encoding: ANSI code page on Windows, UTF-8 on Android and
176 VxWorks, LC_CTYPE locale encoding on other platforms;
Victor Stinnerde427552018-08-29 23:26:55 +0200177 * On Windows, "surrogateescape" error handler;
178 * "surrogateescape" error handler if the LC_CTYPE locale is "C" or "POSIX";
179 * "surrogateescape" error handler if the LC_CTYPE locale has been coerced
180 (PEP 538);
181 * "strict" error handler.
182
183 Supported error handlers: "strict", "surrogateescape" and
184 "surrogatepass". The surrogatepass error handler is only supported
185 if Py_DecodeLocale() and Py_EncodeLocale() use directly the UTF-8 codec;
186 it's only used on Windows.
187
188 initfsencoding() updates the encoding to the Python codec name.
189 For example, "ANSI_X3.4-1968" is replaced with "ascii".
190
191 On Windows, sys._enablelegacywindowsfsencoding() sets the
192 encoding/errors to mbcs/replace at runtime.
193
Victor Stinnerb2457ef2018-08-29 13:25:36 +0200194
195 See Py_FileSystemDefaultEncoding and Py_FileSystemDefaultEncodeErrors.
196 */
Victor Stinner709d23d2019-05-02 14:56:30 -0400197 wchar_t *filesystem_encoding;
198 wchar_t *filesystem_errors;
Victor Stinnerb2457ef2018-08-29 13:25:36 +0200199
Victor Stinner74f65682019-03-15 15:08:05 +0100200 wchar_t *pycache_prefix; /* PYTHONPYCACHEPREFIX, -X pycache_prefix=PATH */
Victor Stinnerae239f62019-05-16 17:02:56 +0200201 int parse_argv; /* Parse argv command line arguments? */
202
203 /* Command line arguments (sys.argv).
204
Victor Stinnercab5d072019-05-17 19:01:14 +0200205 Set parse_argv to 1 to parse argv as Python command line arguments
206 and then strip Python arguments from argv.
Victor Stinnerae239f62019-05-16 17:02:56 +0200207
208 If argv is empty, an empty string is added to ensure that sys.argv
209 always exists and is never empty. */
Victor Stinner331a6a52019-05-27 16:39:22 +0200210 PyWideStringList argv;
Victor Stinnerae239f62019-05-16 17:02:56 +0200211
Victor Stinnerfed02e12019-05-17 11:12:09 +0200212 /* Program name:
213
214 - If Py_SetProgramName() was called, use its value.
215 - On macOS, use PYTHONEXECUTABLE environment variable if set.
216 - If WITH_NEXT_FRAMEWORK macro is defined, use __PYVENV_LAUNCHER__
217 environment variable is set.
218 - Use argv[0] if available and non-empty.
219 - Use "python" on Windows, or "python3 on other platforms. */
220 wchar_t *program_name;
Victor Stinnerae239f62019-05-16 17:02:56 +0200221
Victor Stinner331a6a52019-05-27 16:39:22 +0200222 PyWideStringList xoptions; /* Command line -X options */
223 PyWideStringList warnoptions; /* Warnings options */
Victor Stinner6c785c02018-08-01 17:56:14 +0200224
Victor Stinner6c785c02018-08-01 17:56:14 +0200225 /* If equal to zero, disable the import of the module site and the
226 site-dependent manipulations of sys.path that it entails. Also disable
227 these manipulations if site is explicitly imported later (call
228 site.main() if you want them to be triggered).
229
230 Set to 0 by the -S command line option. If set to -1 (default), it is
231 set to !Py_NoSiteFlag. */
232 int site_import;
233
234 /* Bytes warnings:
235
236 * If equal to 1, issue a warning when comparing bytes or bytearray with
237 str or bytes with int.
238 * If equal or greater to 2, issue an error.
239
240 Incremented by the -b command line option. If set to -1 (default), inherit
241 Py_BytesWarningFlag value. */
242 int bytes_warning;
243
244 /* If greater than 0, enable inspect: when a script is passed as first
245 argument or the -c option is used, enter interactive mode after
246 executing the script or the command, even when sys.stdin does not appear
247 to be a terminal.
248
249 Incremented by the -i command line option. Set to 1 if the PYTHONINSPECT
250 environment variable is non-empty. If set to -1 (default), inherit
251 Py_InspectFlag value. */
252 int inspect;
253
254 /* If greater than 0: enable the interactive mode (REPL).
255
256 Incremented by the -i command line option. If set to -1 (default),
257 inherit Py_InteractiveFlag value. */
258 int interactive;
259
260 /* Optimization level.
261
262 Incremented by the -O command line option. Set by the PYTHONOPTIMIZE
263 environment variable. If set to -1 (default), inherit Py_OptimizeFlag
264 value. */
265 int optimization_level;
266
267 /* If greater than 0, enable the debug mode: turn on parser debugging
268 output (for expert only, depending on compilation options).
269
270 Incremented by the -d command line option. Set by the PYTHONDEBUG
271 environment variable. If set to -1 (default), inherit Py_DebugFlag
272 value. */
273 int parser_debug;
274
275 /* If equal to 0, Python won't try to write ``.pyc`` files on the
276 import of source modules.
277
278 Set to 0 by the -B command line option and the PYTHONDONTWRITEBYTECODE
279 environment variable. If set to -1 (default), it is set to
280 !Py_DontWriteBytecodeFlag. */
281 int write_bytecode;
282
283 /* If greater than 0, enable the verbose mode: print a message each time a
284 module is initialized, showing the place (filename or built-in module)
285 from which it is loaded.
286
287 If greater or equal to 2, print a message for each file that is checked
288 for when searching for a module. Also provides information on module
289 cleanup at exit.
290
291 Incremented by the -v option. Set by the PYTHONVERBOSE environment
292 variable. If set to -1 (default), inherit Py_VerboseFlag value. */
293 int verbose;
294
295 /* If greater than 0, enable the quiet mode: Don't display the copyright
296 and version messages even in interactive mode.
297
298 Incremented by the -q option. If set to -1 (default), inherit
299 Py_QuietFlag value. */
300 int quiet;
301
302 /* If greater than 0, don't add the user site-packages directory to
303 sys.path.
304
305 Set to 0 by the -s and -I command line options , and the PYTHONNOUSERSITE
306 environment variable. If set to -1 (default), it is set to
307 !Py_NoUserSiteDirectory. */
308 int user_site_directory;
309
Victor Stinner54b43bb2019-05-16 18:30:15 +0200310 /* If non-zero, configure C standard steams (stdio, stdout,
311 stderr):
312
313 - Set O_BINARY mode on Windows.
314 - If buffered_stdio is equal to zero, make streams unbuffered.
315 Otherwise, enable streams buffering if interactive is non-zero. */
316 int configure_c_stdio;
317
Victor Stinner6c785c02018-08-01 17:56:14 +0200318 /* If equal to 0, enable unbuffered mode: force the stdout and stderr
319 streams to be unbuffered.
320
321 Set to 0 by the -u option. Set by the PYTHONUNBUFFERED environment
322 variable.
323 If set to -1 (default), it is set to !Py_UnbufferedStdioFlag. */
324 int buffered_stdio;
325
Victor Stinnerdfe0dc72018-08-29 11:47:29 +0200326 /* Encoding of sys.stdin, sys.stdout and sys.stderr.
327 Value set from PYTHONIOENCODING environment variable and
328 Py_SetStandardStreamEncoding() function.
329 See also 'stdio_errors' attribute. */
Victor Stinner709d23d2019-05-02 14:56:30 -0400330 wchar_t *stdio_encoding;
Victor Stinnerdfe0dc72018-08-29 11:47:29 +0200331
332 /* Error handler of sys.stdin and sys.stdout.
333 Value set from PYTHONIOENCODING environment variable and
334 Py_SetStandardStreamEncoding() function.
335 See also 'stdio_encoding' attribute. */
Victor Stinner709d23d2019-05-02 14:56:30 -0400336 wchar_t *stdio_errors;
Victor Stinnerdfe0dc72018-08-29 11:47:29 +0200337
Victor Stinner6c785c02018-08-01 17:56:14 +0200338#ifdef MS_WINDOWS
Victor Stinner6c785c02018-08-01 17:56:14 +0200339 /* If greater than zero, use io.FileIO instead of WindowsConsoleIO for sys
340 standard streams.
341
342 Set to 1 if the PYTHONLEGACYWINDOWSSTDIO environment variable is set to
343 a non-empty string. If set to -1 (default), inherit
344 Py_LegacyWindowsStdioFlag value.
345
346 See PEP 528 for more details. */
347 int legacy_windows_stdio;
348#endif
349
Victor Stinner331a6a52019-05-27 16:39:22 +0200350 /* Value of the --check-hash-based-pycs command line option:
351
352 - "default" means the 'check_source' flag in hash-based pycs
353 determines invalidation
354 - "always" causes the interpreter to hash the source file for
355 invalidation regardless of value of 'check_source' bit
356 - "never" causes the interpreter to always assume hash-based pycs are
357 valid
358
359 The default value is "default".
360
361 See PEP 552 "Deterministic pycs" for more details. */
362 wchar_t *check_hash_pycs_mode;
363
Victor Stinnerae239f62019-05-16 17:02:56 +0200364 /* --- Path configuration inputs ------------ */
365
Victor Stinner331a6a52019-05-27 16:39:22 +0200366 /* If greater than 0, suppress _PyPathConfig_Calculate() warnings on Unix.
367 The parameter has no effect on Windows.
368
369 If set to -1 (default), inherit !Py_FrozenFlag value. */
370 int pathconfig_warnings;
371
372 wchar_t *pythonpath_env; /* PYTHONPATH environment variable */
Victor Stinnerae239f62019-05-16 17:02:56 +0200373 wchar_t *home; /* PYTHONHOME environment variable,
374 see also Py_SetPythonHome(). */
375
376 /* --- Path configuration outputs ----------- */
377
Victor Stinner331a6a52019-05-27 16:39:22 +0200378 int module_search_paths_set; /* If non-zero, use module_search_paths */
379 PyWideStringList module_search_paths; /* sys.path paths. Computed if
380 module_search_paths_set is equal
Victor Stinnerae239f62019-05-16 17:02:56 +0200381 to zero. */
382
Steve Dower9048c492019-06-29 10:34:11 -0700383 wchar_t *executable; /* sys.executable */
384 wchar_t *base_executable; /* sys._base_executable */
385 wchar_t *prefix; /* sys.prefix */
386 wchar_t *base_prefix; /* sys.base_prefix */
387 wchar_t *exec_prefix; /* sys.exec_prefix */
Victor Stinnerae239f62019-05-16 17:02:56 +0200388 wchar_t *base_exec_prefix; /* sys.base_exec_prefix */
Victor Stinnerae239f62019-05-16 17:02:56 +0200389
Victor Stinner62be7632019-03-01 13:10:14 +0100390 /* --- Parameter only used by Py_Main() ---------- */
391
392 /* Skip the first line of the source ('run_filename' parameter), allowing use of non-Unix forms of
393 "#!cmd". This is intended for a DOS specific hack only.
394
395 Set by the -x command line option. */
396 int skip_source_first_line;
397
398 wchar_t *run_command; /* -c command line argument */
399 wchar_t *run_module; /* -m command line argument */
400 wchar_t *run_filename; /* Trailing command line argument without -c or -m */
401
402 /* --- Private fields ---------------------------- */
Victor Stinner6c785c02018-08-01 17:56:14 +0200403
404 /* Install importlib? If set to 0, importlib is not initialized at all.
405 Needed by freeze_importlib. */
406 int _install_importlib;
407
Victor Stinner9ef5dca2019-05-16 17:38:16 +0200408 /* If equal to 0, stop Python initialization before the "main" phase */
409 int _init_main;
Victor Stinner331a6a52019-05-27 16:39:22 +0200410} PyConfig;
Victor Stinner6c785c02018-08-01 17:56:14 +0200411
Victor Stinner331a6a52019-05-27 16:39:22 +0200412PyAPI_FUNC(PyStatus) PyConfig_InitPythonConfig(PyConfig *config);
413PyAPI_FUNC(PyStatus) PyConfig_InitIsolatedConfig(PyConfig *config);
414PyAPI_FUNC(void) PyConfig_Clear(PyConfig *);
415PyAPI_FUNC(PyStatus) PyConfig_SetString(
416 PyConfig *config,
Victor Stinnerbab0db62019-05-18 03:21:27 +0200417 wchar_t **config_str,
418 const wchar_t *str);
Victor Stinner331a6a52019-05-27 16:39:22 +0200419PyAPI_FUNC(PyStatus) PyConfig_SetBytesString(
420 PyConfig *config,
Victor Stinnerbab0db62019-05-18 03:21:27 +0200421 wchar_t **config_str,
422 const char *str);
Victor Stinner331a6a52019-05-27 16:39:22 +0200423PyAPI_FUNC(PyStatus) PyConfig_Read(PyConfig *config);
424PyAPI_FUNC(PyStatus) PyConfig_SetBytesArgv(
425 PyConfig *config,
Victor Stinnerbab0db62019-05-18 03:21:27 +0200426 Py_ssize_t argc,
Victor Stinner6d1c4672019-05-20 11:02:00 +0200427 char * const *argv);
Victor Stinner331a6a52019-05-27 16:39:22 +0200428PyAPI_FUNC(PyStatus) PyConfig_SetArgv(PyConfig *config,
Victor Stinnerbab0db62019-05-18 03:21:27 +0200429 Py_ssize_t argc,
Victor Stinner6d1c4672019-05-20 11:02:00 +0200430 wchar_t * const *argv);
Victor Stinner36242fd2019-07-01 19:13:50 +0200431PyAPI_FUNC(PyStatus) PyConfig_SetWideStringList(PyConfig *config,
432 PyWideStringList *list,
433 Py_ssize_t length, wchar_t **items);
Victor Stinnercab5d072019-05-17 19:01:14 +0200434
Victor Stinner6c785c02018-08-01 17:56:14 +0200435#ifdef __cplusplus
436}
437#endif
Victor Stinnerf684d832019-03-01 03:44:13 +0100438#endif /* !Py_LIMITED_API */
Victor Stinner6c785c02018-08-01 17:56:14 +0200439#endif /* !Py_PYCORECONFIG_H */