Mercurial > cpython-lru_cache-weakref
comparison Python/pythonrun.c @ 75097:ed76dc34b39d
Merge 3.2: Issue #13703 plus some related test suite fixes.
| author | Georg Brandl <georg@python.org> |
|---|---|
| date | Tue, 21 Feb 2012 00:33:36 +0100 |
| parents | 2bd7f40108b4 4a31f6b11e7a |
| children | 88aede44ded1 |
comparison
equal
deleted
inserted
replaced
| 75082:3297dcdad196 | 75097:ed76dc34b39d |
|---|---|
| 71 extern void _PyUnicode_Fini(void); | 71 extern void _PyUnicode_Fini(void); |
| 72 extern int _PyLong_Init(void); | 72 extern int _PyLong_Init(void); |
| 73 extern void PyLong_Fini(void); | 73 extern void PyLong_Fini(void); |
| 74 extern int _PyFaulthandler_Init(void); | 74 extern int _PyFaulthandler_Init(void); |
| 75 extern void _PyFaulthandler_Fini(void); | 75 extern void _PyFaulthandler_Fini(void); |
| 76 extern void _PyRandom_Init(void); | |
| 76 | 77 |
| 77 #ifdef WITH_THREAD | 78 #ifdef WITH_THREAD |
| 78 extern void _PyGILState_Init(PyInterpreterState *, PyThreadState *); | 79 extern void _PyGILState_Init(PyInterpreterState *, PyThreadState *); |
| 79 extern void _PyGILState_Fini(void); | 80 extern void _PyGILState_Fini(void); |
| 80 #endif /* WITH_THREAD */ | 81 #endif /* WITH_THREAD */ |
| 90 int Py_UseClassExceptionsFlag = 1; /* Needed by bltinmodule.c: deprecated */ | 91 int Py_UseClassExceptionsFlag = 1; /* Needed by bltinmodule.c: deprecated */ |
| 91 int Py_FrozenFlag; /* Needed by getpath.c */ | 92 int Py_FrozenFlag; /* Needed by getpath.c */ |
| 92 int Py_IgnoreEnvironmentFlag; /* e.g. PYTHONPATH, PYTHONHOME */ | 93 int Py_IgnoreEnvironmentFlag; /* e.g. PYTHONPATH, PYTHONHOME */ |
| 93 int Py_NoUserSiteDirectory = 0; /* for -s and site.py */ | 94 int Py_NoUserSiteDirectory = 0; /* for -s and site.py */ |
| 94 int Py_UnbufferedStdioFlag = 0; /* Unbuffered binary std{in,out,err} */ | 95 int Py_UnbufferedStdioFlag = 0; /* Unbuffered binary std{in,out,err} */ |
| 96 int Py_HashRandomizationFlag = 0; /* for -R and PYTHONHASHSEED */ | |
| 95 | 97 |
| 96 PyThreadState *_Py_Finalizing = NULL; | 98 PyThreadState *_Py_Finalizing = NULL; |
| 97 | 99 |
| 98 /* PyModule_GetWarningsModule is no longer necessary as of 2.6 | 100 /* PyModule_GetWarningsModule is no longer necessary as of 2.6 |
| 99 since _warnings is builtin. This API should not be used. */ | 101 since _warnings is builtin. This API should not be used. */ |
| 216 Py_VerboseFlag = add_flag(Py_VerboseFlag, p); | 218 Py_VerboseFlag = add_flag(Py_VerboseFlag, p); |
| 217 if ((p = Py_GETENV("PYTHONOPTIMIZE")) && *p != '\0') | 219 if ((p = Py_GETENV("PYTHONOPTIMIZE")) && *p != '\0') |
| 218 Py_OptimizeFlag = add_flag(Py_OptimizeFlag, p); | 220 Py_OptimizeFlag = add_flag(Py_OptimizeFlag, p); |
| 219 if ((p = Py_GETENV("PYTHONDONTWRITEBYTECODE")) && *p != '\0') | 221 if ((p = Py_GETENV("PYTHONDONTWRITEBYTECODE")) && *p != '\0') |
| 220 Py_DontWriteBytecodeFlag = add_flag(Py_DontWriteBytecodeFlag, p); | 222 Py_DontWriteBytecodeFlag = add_flag(Py_DontWriteBytecodeFlag, p); |
| 223 /* The variable is only tested for existence here; _PyRandom_Init will | |
| 224 check its value further. */ | |
| 225 if ((p = Py_GETENV("PYTHONHASHSEED")) && *p != '\0') | |
| 226 Py_HashRandomizationFlag = add_flag(Py_HashRandomizationFlag, p); | |
| 227 | |
| 228 _PyRandom_Init(); | |
| 221 | 229 |
| 222 interp = PyInterpreterState_New(); | 230 interp = PyInterpreterState_New(); |
| 223 if (interp == NULL) | 231 if (interp == NULL) |
| 224 Py_FatalError("Py_Initialize: can't make first interpreter"); | 232 Py_FatalError("Py_Initialize: can't make first interpreter"); |
| 225 | 233 |
