mirror of
https://github.com/python/cpython.git
synced 2025-09-04 16:01:10 +00:00
bpo-34170: Add Python/coreconfig.c for _PyCoreConfig (GH-8607)
* Add Include/coreconfig.h * Move config_*() and _PyCoreConfig_*() functions from Modules/main.c to a new Python/coreconfig.c file. * Inline _Py_ReadHashSeed() into config_init_hash_seed() * Move global configuration variables to coreconfig.c
This commit is contained in:
parent
cfc8831f5e
commit
6c785c0ebd
14 changed files with 1314 additions and 1288 deletions
|
@ -11,29 +11,6 @@
|
|||
|
||||
#include <ctype.h>
|
||||
|
||||
/* The default encoding used by the platform file system APIs
|
||||
Can remain NULL for all platforms that don't have such a concept
|
||||
|
||||
Don't forget to modify PyUnicode_DecodeFSDefault() if you touch any of the
|
||||
values for Py_FileSystemDefaultEncoding!
|
||||
*/
|
||||
#if defined(__APPLE__)
|
||||
const char *Py_FileSystemDefaultEncoding = "utf-8";
|
||||
int Py_HasFileSystemDefaultEncoding = 1;
|
||||
#elif defined(MS_WINDOWS)
|
||||
/* may be changed by initfsencoding(), but should never be free()d */
|
||||
const char *Py_FileSystemDefaultEncoding = "utf-8";
|
||||
int Py_HasFileSystemDefaultEncoding = 1;
|
||||
#else
|
||||
const char *Py_FileSystemDefaultEncoding = NULL; /* set by initfsencoding() */
|
||||
int Py_HasFileSystemDefaultEncoding = 0;
|
||||
#endif
|
||||
const char *Py_FileSystemDefaultEncodeErrors = "surrogateescape";
|
||||
/* UTF-8 mode (PEP 540): if equals to 1, use the UTF-8 encoding, and change
|
||||
stdin and stdout error handler to "surrogateescape". It is equal to
|
||||
-1 by default: unknown, will be set by Py_Main() */
|
||||
int Py_UTF8Mode = -1;
|
||||
|
||||
_Py_IDENTIFIER(__builtins__);
|
||||
_Py_IDENTIFIER(__dict__);
|
||||
_Py_IDENTIFIER(__prepare__);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue