1 #ifndef Py_CPYTHON_PYLIFECYCLE_H 2 # error "this header file must not be included directly" 3 #endif 4 5 /* Py_FrozenMain is kept out of the Limited API until documented and present 6 in all builds of Python */ 7 PyAPI_FUNC(int) Py_FrozenMain(int argc, char **argv); 8 9 /* Only used by applications that embed the interpreter and need to 10 * override the standard encoding determination mechanism 11 */ 12 PyAPI_FUNC(int) Py_SetStandardStreamEncoding(const char *encoding, 13 const char *errors); 14 15 /* PEP 432 Multi-phase initialization API (Private while provisional!) */ 16 17 PyAPI_FUNC(PyStatus) Py_PreInitialize( 18 const PyPreConfig *src_config); 19 PyAPI_FUNC(PyStatus) Py_PreInitializeFromBytesArgs( 20 const PyPreConfig *src_config, 21 Py_ssize_t argc, 22 char **argv); 23 PyAPI_FUNC(PyStatus) Py_PreInitializeFromArgs( 24 const PyPreConfig *src_config, 25 Py_ssize_t argc, 26 wchar_t **argv); 27 28 PyAPI_FUNC(int) _Py_IsCoreInitialized(void); 29 30 31 /* Initialization and finalization */ 32 33 PyAPI_FUNC(PyStatus) Py_InitializeFromConfig( 34 const PyConfig *config); 35 PyAPI_FUNC(PyStatus) _Py_InitializeMain(void); 36 37 PyAPI_FUNC(int) Py_RunMain(void); 38 39 40 PyAPI_FUNC(void) _Py_NO_RETURN Py_ExitStatusException(PyStatus err); 41 42 /* Restore signals that the interpreter has called SIG_IGN on to SIG_DFL. */ 43 PyAPI_FUNC(void) _Py_RestoreSignals(void); 44 45 PyAPI_FUNC(int) Py_FdIsInteractive(FILE *, const char *); 46 PyAPI_FUNC(int) _Py_FdIsInteractive(FILE *fp, PyObject *filename); 47 48 PyAPI_FUNC(void) _Py_SetProgramFullPath(const wchar_t *); 49 50 PyAPI_FUNC(const char *) _Py_gitidentifier(void); 51 PyAPI_FUNC(const char *) _Py_gitversion(void); 52 53 PyAPI_FUNC(int) _Py_IsFinalizing(void); 54 55 /* Random */ 56 PyAPI_FUNC(int) _PyOS_URandom(void *buffer, Py_ssize_t size); 57 PyAPI_FUNC(int) _PyOS_URandomNonblock(void *buffer, Py_ssize_t size); 58 59 /* Legacy locale support */ 60 PyAPI_FUNC(int) _Py_CoerceLegacyLocale(int warn); 61 PyAPI_FUNC(int) _Py_LegacyLocaleDetected(int warn); 62 PyAPI_FUNC(char *) _Py_SetLocaleFromEnv(int category); 63 64 PyAPI_FUNC(PyThreadState *) _Py_NewInterpreter(int isolated_subinterpreter); 65