blob: c5fa2b3857e7a2f544d315f779ec83e54c043083 [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 Stinner022be022019-05-22 23:58:50 +020048 int _config_init; /* _PyConfigInitEnum value */
Victor Stinner373893c2019-05-02 14:46:29 -040049
Victor Stinner331a6a52019-05-27 16:39:22 +020050 /* Parse Py_PreInitializeFromBytesArgs() arguments?
51 See PyConfig.parse_argv */
Victor Stinner6d1c4672019-05-20 11:02:00 +020052 int parse_argv;
53
Victor Stinnercad1f742019-03-05 02:01:27 +010054 /* If greater than 0, enable isolated mode: sys.path contains
55 neither the script's directory nor the user's site-packages directory.
56
57 Set to 1 by the -I command line option. If set to -1 (default), inherit
58 Py_IsolatedFlag value. */
59 int isolated;
Victor Stinner6c785c02018-08-01 17:56:14 +020060
61 /* If greater than 0: use environment variables.
62 Set to 0 by -E command line option. If set to -1 (default), it is
63 set to !Py_IgnoreEnvironmentFlag. */
64 int use_environment;
Victor Stinner5a02e0d2019-03-05 12:32:09 +010065
Victor Stinnerbcfbbd72019-05-17 22:44:16 +020066 /* Set the LC_CTYPE locale to the user preferred locale? If equals to 0,
67 set coerce_c_locale and coerce_c_locale_warn to 0. */
68 int configure_locale;
69
Victor Stinnerd929f182019-03-27 18:28:46 +010070 /* Coerce the LC_CTYPE locale if it's equal to "C"? (PEP 538)
71
72 Set to 0 by PYTHONCOERCECLOCALE=0. Set to 1 by PYTHONCOERCECLOCALE=1.
73 Set to 2 if the user preferred LC_CTYPE locale is "C".
Victor Stinnerf72346c2019-03-25 17:54:58 +010074
MandarJKulkarni33ce3f02019-05-29 04:25:05 +053075 If it is equal to 1, LC_CTYPE locale is read to decide if it should be
Victor Stinnerf72346c2019-03-25 17:54:58 +010076 coerced or not (ex: PYTHONCOERCECLOCALE=1). Internally, it is set to 2
Victor Stinnercab5d072019-05-17 19:01:14 +020077 if the LC_CTYPE locale must be coerced.
78
MandarJKulkarni33ce3f02019-05-29 04:25:05 +053079 Disable by default (set to 0). Set it to -1 to let Python decide if it
Victor Stinnercab5d072019-05-17 19:01:14 +020080 should be enabled or not. */
Victor Stinnerf72346c2019-03-25 17:54:58 +010081 int coerce_c_locale;
Victor Stinnerd929f182019-03-27 18:28:46 +010082
83 /* Emit a warning if the LC_CTYPE locale is coerced?
84
Victor Stinnercab5d072019-05-17 19:01:14 +020085 Set to 1 by PYTHONCOERCECLOCALE=warn.
86
MandarJKulkarni33ce3f02019-05-29 04:25:05 +053087 Disable by default (set to 0). Set it to -1 to let Python decide if it
Victor Stinnercab5d072019-05-17 19:01:14 +020088 should be enabled or not. */
Victor Stinnerd929f182019-03-27 18:28:46 +010089 int coerce_c_locale_warn;
Victor Stinner5a02e0d2019-03-05 12:32:09 +010090
91#ifdef MS_WINDOWS
92 /* If greater than 1, use the "mbcs" encoding instead of the UTF-8
93 encoding for the filesystem encoding.
94
95 Set to 1 if the PYTHONLEGACYWINDOWSFSENCODING environment variable is
96 set to a non-empty string. If set to -1 (default), inherit
97 Py_LegacyWindowsFSEncodingFlag value.
98
99 See PEP 529 for more details. */
100 int legacy_windows_fs_encoding;
101#endif
102
Victor Stinnerd929f182019-03-27 18:28:46 +0100103 /* Enable UTF-8 mode? (PEP 540)
104
105 Disabled by default (equals to 0).
106
107 Set to 1 by "-X utf8" and "-X utf8=1" command line options.
108 Set to 1 by PYTHONUTF8=1 environment variable.
109
110 Set to 0 by "-X utf8=0" and PYTHONUTF8=0.
111
112 If equals to -1, it is set to 1 if the LC_CTYPE locale is "C" or
Victor Stinner022be022019-05-22 23:58:50 +0200113 "POSIX", otherwise it is set to 0. Inherit Py_UTF8Mode value value. */
Victor Stinner5a02e0d2019-03-05 12:32:09 +0100114 int utf8_mode;
Victor Stinnerb35be4b2019-03-05 17:37:44 +0100115
Victor Stinnerb9783d22020-01-24 10:22:18 +0100116 /* If non-zero, enable the Python Development Mode.
117
118 Set to 1 by the -X dev command line option. Set by the PYTHONDEVMODE
119 environment variable. */
120 int dev_mode;
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 Stinner3c30a762019-10-01 10:56:37 +0200127PyAPI_FUNC(void) PyPreConfig_InitPythonConfig(PyPreConfig *config);
128PyAPI_FUNC(void) 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 Stinner022be022019-05-22 23:58:50 +0200134 int _config_init; /* _PyConfigInitEnum value */
Victor Stinner373893c2019-05-02 14:46:29 -0400135
Victor Stinner331a6a52019-05-27 16:39:22 +0200136 int isolated; /* Isolated mode? see PyPreConfig.isolated */
137 int use_environment; /* Use environment variables? see PyPreConfig.use_environment */
Victor Stinnerb9783d22020-01-24 10:22:18 +0100138 int dev_mode; /* Python Development Mode? See PyPreConfig.dev_mode */
Victor Stinnercad1f742019-03-05 02:01:27 +0100139
140 /* Install signal handlers? Yes by default. */
141 int install_signal_handlers;
Victor Stinner6c785c02018-08-01 17:56:14 +0200142
143 int use_hash_seed; /* PYTHONHASHSEED=x */
144 unsigned long hash_seed;
145
Victor Stinner6c785c02018-08-01 17:56:14 +0200146 /* Enable faulthandler?
147 Set to 1 by -X faulthandler and PYTHONFAULTHANDLER. -1 means unset. */
148 int faulthandler;
149
150 /* Enable tracemalloc?
151 Set by -X tracemalloc=N and PYTHONTRACEMALLOC. -1 means unset */
152 int tracemalloc;
153
154 int import_time; /* PYTHONPROFILEIMPORTTIME, -X importtime */
155 int show_ref_count; /* -X showrefcount */
Victor Stinner6c785c02018-08-01 17:56:14 +0200156 int dump_refs; /* PYTHONDUMPREFS */
157 int malloc_stats; /* PYTHONMALLOCSTATS */
Victor Stinner6c785c02018-08-01 17:56:14 +0200158
Victor Stinnerde427552018-08-29 23:26:55 +0200159 /* Python filesystem encoding and error handler:
Victor Stinnerb2457ef2018-08-29 13:25:36 +0200160 sys.getfilesystemencoding() and sys.getfilesystemencodeerrors().
161
Victor Stinnerde427552018-08-29 23:26:55 +0200162 Default encoding and error handler:
163
164 * if Py_SetStandardStreamEncoding() has been called: they have the
165 highest priority;
166 * PYTHONIOENCODING environment variable;
167 * The UTF-8 Mode uses UTF-8/surrogateescape;
Victor Stinner905f1ac2018-10-30 12:58:10 +0100168 * If Python forces the usage of the ASCII encoding (ex: C locale
169 or POSIX locale on FreeBSD or HP-UX), use ASCII/surrogateescape;
pxinwrf4b0a1c2019-03-04 17:02:06 +0800170 * locale encoding: ANSI code page on Windows, UTF-8 on Android and
171 VxWorks, LC_CTYPE locale encoding on other platforms;
Victor Stinnerde427552018-08-29 23:26:55 +0200172 * On Windows, "surrogateescape" error handler;
173 * "surrogateescape" error handler if the LC_CTYPE locale is "C" or "POSIX";
174 * "surrogateescape" error handler if the LC_CTYPE locale has been coerced
175 (PEP 538);
176 * "strict" error handler.
177
178 Supported error handlers: "strict", "surrogateescape" and
179 "surrogatepass". The surrogatepass error handler is only supported
180 if Py_DecodeLocale() and Py_EncodeLocale() use directly the UTF-8 codec;
181 it's only used on Windows.
182
183 initfsencoding() updates the encoding to the Python codec name.
184 For example, "ANSI_X3.4-1968" is replaced with "ascii".
185
186 On Windows, sys._enablelegacywindowsfsencoding() sets the
187 encoding/errors to mbcs/replace at runtime.
188
Victor Stinnerb2457ef2018-08-29 13:25:36 +0200189
190 See Py_FileSystemDefaultEncoding and Py_FileSystemDefaultEncodeErrors.
191 */
Victor Stinner709d23d2019-05-02 14:56:30 -0400192 wchar_t *filesystem_encoding;
193 wchar_t *filesystem_errors;
Victor Stinnerb2457ef2018-08-29 13:25:36 +0200194
Victor Stinner74f65682019-03-15 15:08:05 +0100195 wchar_t *pycache_prefix; /* PYTHONPYCACHEPREFIX, -X pycache_prefix=PATH */
Victor Stinnerae239f62019-05-16 17:02:56 +0200196 int parse_argv; /* Parse argv command line arguments? */
197
198 /* Command line arguments (sys.argv).
199
Victor Stinnercab5d072019-05-17 19:01:14 +0200200 Set parse_argv to 1 to parse argv as Python command line arguments
201 and then strip Python arguments from argv.
Victor Stinnerae239f62019-05-16 17:02:56 +0200202
203 If argv is empty, an empty string is added to ensure that sys.argv
204 always exists and is never empty. */
Victor Stinner331a6a52019-05-27 16:39:22 +0200205 PyWideStringList argv;
Victor Stinnerae239f62019-05-16 17:02:56 +0200206
Victor Stinnerfed02e12019-05-17 11:12:09 +0200207 /* Program name:
208
209 - If Py_SetProgramName() was called, use its value.
210 - On macOS, use PYTHONEXECUTABLE environment variable if set.
211 - If WITH_NEXT_FRAMEWORK macro is defined, use __PYVENV_LAUNCHER__
212 environment variable is set.
213 - Use argv[0] if available and non-empty.
214 - Use "python" on Windows, or "python3 on other platforms. */
215 wchar_t *program_name;
Victor Stinnerae239f62019-05-16 17:02:56 +0200216
Victor Stinner331a6a52019-05-27 16:39:22 +0200217 PyWideStringList xoptions; /* Command line -X options */
Victor Stinnerfb4ae152019-09-30 01:40:17 +0200218
219 /* Warnings options: lowest to highest priority. warnings.filters
220 is built in the reverse order (highest to lowest priority). */
221 PyWideStringList warnoptions;
Victor Stinner6c785c02018-08-01 17:56:14 +0200222
Victor Stinner6c785c02018-08-01 17:56:14 +0200223 /* If equal to zero, disable the import of the module site and the
224 site-dependent manipulations of sys.path that it entails. Also disable
225 these manipulations if site is explicitly imported later (call
226 site.main() if you want them to be triggered).
227
228 Set to 0 by the -S command line option. If set to -1 (default), it is
229 set to !Py_NoSiteFlag. */
230 int site_import;
231
232 /* Bytes warnings:
233
234 * If equal to 1, issue a warning when comparing bytes or bytearray with
235 str or bytes with int.
236 * If equal or greater to 2, issue an error.
237
238 Incremented by the -b command line option. If set to -1 (default), inherit
239 Py_BytesWarningFlag value. */
240 int bytes_warning;
241
242 /* If greater than 0, enable inspect: when a script is passed as first
243 argument or the -c option is used, enter interactive mode after
244 executing the script or the command, even when sys.stdin does not appear
245 to be a terminal.
246
247 Incremented by the -i command line option. Set to 1 if the PYTHONINSPECT
248 environment variable is non-empty. If set to -1 (default), inherit
249 Py_InspectFlag value. */
250 int inspect;
251
252 /* If greater than 0: enable the interactive mode (REPL).
253
254 Incremented by the -i command line option. If set to -1 (default),
255 inherit Py_InteractiveFlag value. */
256 int interactive;
257
258 /* Optimization level.
259
260 Incremented by the -O command line option. Set by the PYTHONOPTIMIZE
261 environment variable. If set to -1 (default), inherit Py_OptimizeFlag
262 value. */
263 int optimization_level;
264
265 /* If greater than 0, enable the debug mode: turn on parser debugging
266 output (for expert only, depending on compilation options).
267
268 Incremented by the -d command line option. Set by the PYTHONDEBUG
269 environment variable. If set to -1 (default), inherit Py_DebugFlag
270 value. */
271 int parser_debug;
272
273 /* If equal to 0, Python won't try to write ``.pyc`` files on the
274 import of source modules.
275
276 Set to 0 by the -B command line option and the PYTHONDONTWRITEBYTECODE
277 environment variable. If set to -1 (default), it is set to
278 !Py_DontWriteBytecodeFlag. */
279 int write_bytecode;
280
281 /* If greater than 0, enable the verbose mode: print a message each time a
282 module is initialized, showing the place (filename or built-in module)
283 from which it is loaded.
284
285 If greater or equal to 2, print a message for each file that is checked
286 for when searching for a module. Also provides information on module
287 cleanup at exit.
288
289 Incremented by the -v option. Set by the PYTHONVERBOSE environment
290 variable. If set to -1 (default), inherit Py_VerboseFlag value. */
291 int verbose;
292
293 /* If greater than 0, enable the quiet mode: Don't display the copyright
294 and version messages even in interactive mode.
295
296 Incremented by the -q option. If set to -1 (default), inherit
297 Py_QuietFlag value. */
298 int quiet;
299
300 /* If greater than 0, don't add the user site-packages directory to
301 sys.path.
302
303 Set to 0 by the -s and -I command line options , and the PYTHONNOUSERSITE
304 environment variable. If set to -1 (default), it is set to
305 !Py_NoUserSiteDirectory. */
306 int user_site_directory;
307
Victor Stinner54b43bb2019-05-16 18:30:15 +0200308 /* If non-zero, configure C standard steams (stdio, stdout,
309 stderr):
310
311 - Set O_BINARY mode on Windows.
312 - If buffered_stdio is equal to zero, make streams unbuffered.
313 Otherwise, enable streams buffering if interactive is non-zero. */
314 int configure_c_stdio;
315
Victor Stinner6c785c02018-08-01 17:56:14 +0200316 /* If equal to 0, enable unbuffered mode: force the stdout and stderr
317 streams to be unbuffered.
318
319 Set to 0 by the -u option. Set by the PYTHONUNBUFFERED environment
320 variable.
321 If set to -1 (default), it is set to !Py_UnbufferedStdioFlag. */
322 int buffered_stdio;
323
Victor Stinnerdfe0dc72018-08-29 11:47:29 +0200324 /* Encoding of sys.stdin, sys.stdout and sys.stderr.
325 Value set from PYTHONIOENCODING environment variable and
326 Py_SetStandardStreamEncoding() function.
327 See also 'stdio_errors' attribute. */
Victor Stinner709d23d2019-05-02 14:56:30 -0400328 wchar_t *stdio_encoding;
Victor Stinnerdfe0dc72018-08-29 11:47:29 +0200329
330 /* Error handler of sys.stdin and sys.stdout.
331 Value set from PYTHONIOENCODING environment variable and
332 Py_SetStandardStreamEncoding() function.
333 See also 'stdio_encoding' attribute. */
Victor Stinner709d23d2019-05-02 14:56:30 -0400334 wchar_t *stdio_errors;
Victor Stinnerdfe0dc72018-08-29 11:47:29 +0200335
Victor Stinner6c785c02018-08-01 17:56:14 +0200336#ifdef MS_WINDOWS
Victor Stinner6c785c02018-08-01 17:56:14 +0200337 /* If greater than zero, use io.FileIO instead of WindowsConsoleIO for sys
338 standard streams.
339
340 Set to 1 if the PYTHONLEGACYWINDOWSSTDIO environment variable is set to
341 a non-empty string. If set to -1 (default), inherit
342 Py_LegacyWindowsStdioFlag value.
343
344 See PEP 528 for more details. */
345 int legacy_windows_stdio;
346#endif
347
Victor Stinner331a6a52019-05-27 16:39:22 +0200348 /* Value of the --check-hash-based-pycs command line option:
349
350 - "default" means the 'check_source' flag in hash-based pycs
351 determines invalidation
352 - "always" causes the interpreter to hash the source file for
353 invalidation regardless of value of 'check_source' bit
354 - "never" causes the interpreter to always assume hash-based pycs are
355 valid
356
357 The default value is "default".
358
359 See PEP 552 "Deterministic pycs" for more details. */
360 wchar_t *check_hash_pycs_mode;
361
Victor Stinnerae239f62019-05-16 17:02:56 +0200362 /* --- Path configuration inputs ------------ */
363
Victor Stinner331a6a52019-05-27 16:39:22 +0200364 /* If greater than 0, suppress _PyPathConfig_Calculate() warnings on Unix.
365 The parameter has no effect on Windows.
366
367 If set to -1 (default), inherit !Py_FrozenFlag value. */
368 int pathconfig_warnings;
369
370 wchar_t *pythonpath_env; /* PYTHONPATH environment variable */
Victor Stinnerae239f62019-05-16 17:02:56 +0200371 wchar_t *home; /* PYTHONHOME environment variable,
372 see also Py_SetPythonHome(). */
373
374 /* --- Path configuration outputs ----------- */
375
Victor Stinner331a6a52019-05-27 16:39:22 +0200376 int module_search_paths_set; /* If non-zero, use module_search_paths */
377 PyWideStringList module_search_paths; /* sys.path paths. Computed if
378 module_search_paths_set is equal
Victor Stinnerae239f62019-05-16 17:02:56 +0200379 to zero. */
380
Steve Dower9048c492019-06-29 10:34:11 -0700381 wchar_t *executable; /* sys.executable */
382 wchar_t *base_executable; /* sys._base_executable */
383 wchar_t *prefix; /* sys.prefix */
384 wchar_t *base_prefix; /* sys.base_prefix */
385 wchar_t *exec_prefix; /* sys.exec_prefix */
Victor Stinnerae239f62019-05-16 17:02:56 +0200386 wchar_t *base_exec_prefix; /* sys.base_exec_prefix */
Victor Stinnerae239f62019-05-16 17:02:56 +0200387
Victor Stinner62be7632019-03-01 13:10:14 +0100388 /* --- Parameter only used by Py_Main() ---------- */
389
390 /* Skip the first line of the source ('run_filename' parameter), allowing use of non-Unix forms of
391 "#!cmd". This is intended for a DOS specific hack only.
392
393 Set by the -x command line option. */
394 int skip_source_first_line;
395
396 wchar_t *run_command; /* -c command line argument */
397 wchar_t *run_module; /* -m command line argument */
398 wchar_t *run_filename; /* Trailing command line argument without -c or -m */
399
400 /* --- Private fields ---------------------------- */
Victor Stinner6c785c02018-08-01 17:56:14 +0200401
402 /* Install importlib? If set to 0, importlib is not initialized at all.
403 Needed by freeze_importlib. */
404 int _install_importlib;
405
Victor Stinner9ef5dca2019-05-16 17:38:16 +0200406 /* If equal to 0, stop Python initialization before the "main" phase */
407 int _init_main;
Victor Stinner331a6a52019-05-27 16:39:22 +0200408} PyConfig;
Victor Stinner6c785c02018-08-01 17:56:14 +0200409
Victor Stinner8462a492019-10-01 12:06:16 +0200410PyAPI_FUNC(void) PyConfig_InitPythonConfig(PyConfig *config);
411PyAPI_FUNC(void) PyConfig_InitIsolatedConfig(PyConfig *config);
Victor Stinner331a6a52019-05-27 16:39:22 +0200412PyAPI_FUNC(void) PyConfig_Clear(PyConfig *);
413PyAPI_FUNC(PyStatus) PyConfig_SetString(
414 PyConfig *config,
Victor Stinnerbab0db62019-05-18 03:21:27 +0200415 wchar_t **config_str,
416 const wchar_t *str);
Victor Stinner331a6a52019-05-27 16:39:22 +0200417PyAPI_FUNC(PyStatus) PyConfig_SetBytesString(
418 PyConfig *config,
Victor Stinnerbab0db62019-05-18 03:21:27 +0200419 wchar_t **config_str,
420 const char *str);
Victor Stinner331a6a52019-05-27 16:39:22 +0200421PyAPI_FUNC(PyStatus) PyConfig_Read(PyConfig *config);
422PyAPI_FUNC(PyStatus) PyConfig_SetBytesArgv(
423 PyConfig *config,
Victor Stinnerbab0db62019-05-18 03:21:27 +0200424 Py_ssize_t argc,
Victor Stinner6d1c4672019-05-20 11:02:00 +0200425 char * const *argv);
Victor Stinner331a6a52019-05-27 16:39:22 +0200426PyAPI_FUNC(PyStatus) PyConfig_SetArgv(PyConfig *config,
Victor Stinnerbab0db62019-05-18 03:21:27 +0200427 Py_ssize_t argc,
Victor Stinner6d1c4672019-05-20 11:02:00 +0200428 wchar_t * const *argv);
Victor Stinner36242fd2019-07-01 19:13:50 +0200429PyAPI_FUNC(PyStatus) PyConfig_SetWideStringList(PyConfig *config,
430 PyWideStringList *list,
431 Py_ssize_t length, wchar_t **items);
Victor Stinnercab5d072019-05-17 19:01:14 +0200432
Victor Stinner6c785c02018-08-01 17:56:14 +0200433#ifdef __cplusplus
434}
435#endif
Victor Stinnerf684d832019-03-01 03:44:13 +0100436#endif /* !Py_LIMITED_API */
Victor Stinner6c785c02018-08-01 17:56:14 +0200437#endif /* !Py_PYCORECONFIG_H */