jpayne@69: #ifndef Py_CPYTHON_PYLIFECYCLE_H jpayne@69: # error "this header file must not be included directly" jpayne@69: #endif jpayne@69: jpayne@69: #ifdef __cplusplus jpayne@69: extern "C" { jpayne@69: #endif jpayne@69: jpayne@69: /* Only used by applications that embed the interpreter and need to jpayne@69: * override the standard encoding determination mechanism jpayne@69: */ jpayne@69: PyAPI_FUNC(int) Py_SetStandardStreamEncoding(const char *encoding, jpayne@69: const char *errors); jpayne@69: jpayne@69: /* PEP 432 Multi-phase initialization API (Private while provisional!) */ jpayne@69: jpayne@69: PyAPI_FUNC(PyStatus) Py_PreInitialize( jpayne@69: const PyPreConfig *src_config); jpayne@69: PyAPI_FUNC(PyStatus) Py_PreInitializeFromBytesArgs( jpayne@69: const PyPreConfig *src_config, jpayne@69: Py_ssize_t argc, jpayne@69: char **argv); jpayne@69: PyAPI_FUNC(PyStatus) Py_PreInitializeFromArgs( jpayne@69: const PyPreConfig *src_config, jpayne@69: Py_ssize_t argc, jpayne@69: wchar_t **argv); jpayne@69: jpayne@69: PyAPI_FUNC(int) _Py_IsCoreInitialized(void); jpayne@69: jpayne@69: jpayne@69: /* Initialization and finalization */ jpayne@69: jpayne@69: PyAPI_FUNC(PyStatus) Py_InitializeFromConfig( jpayne@69: const PyConfig *config); jpayne@69: PyAPI_FUNC(PyStatus) _Py_InitializeFromArgs( jpayne@69: const PyConfig *config, jpayne@69: Py_ssize_t argc, jpayne@69: char * const *argv); jpayne@69: PyAPI_FUNC(PyStatus) _Py_InitializeFromWideArgs( jpayne@69: const PyConfig *config, jpayne@69: Py_ssize_t argc, jpayne@69: wchar_t * const *argv); jpayne@69: PyAPI_FUNC(PyStatus) _Py_InitializeMain(void); jpayne@69: jpayne@69: PyAPI_FUNC(int) Py_RunMain(void); jpayne@69: jpayne@69: jpayne@69: PyAPI_FUNC(void) _Py_NO_RETURN Py_ExitStatusException(PyStatus err); jpayne@69: jpayne@69: /* Py_PyAtExit is for the atexit module, Py_AtExit is for low-level jpayne@69: * exit functions. jpayne@69: */ jpayne@69: PyAPI_FUNC(void) _Py_PyAtExit(void (*func)(PyObject *), PyObject *); jpayne@69: jpayne@69: /* Restore signals that the interpreter has called SIG_IGN on to SIG_DFL. */ jpayne@69: PyAPI_FUNC(void) _Py_RestoreSignals(void); jpayne@69: jpayne@69: PyAPI_FUNC(int) Py_FdIsInteractive(FILE *, const char *); jpayne@69: jpayne@69: PyAPI_FUNC(void) _Py_SetProgramFullPath(const wchar_t *); jpayne@69: jpayne@69: PyAPI_FUNC(const char *) _Py_gitidentifier(void); jpayne@69: PyAPI_FUNC(const char *) _Py_gitversion(void); jpayne@69: jpayne@69: PyAPI_FUNC(int) _Py_IsFinalizing(void); jpayne@69: jpayne@69: /* Random */ jpayne@69: PyAPI_FUNC(int) _PyOS_URandom(void *buffer, Py_ssize_t size); jpayne@69: PyAPI_FUNC(int) _PyOS_URandomNonblock(void *buffer, Py_ssize_t size); jpayne@69: jpayne@69: /* Legacy locale support */ jpayne@69: PyAPI_FUNC(int) _Py_CoerceLegacyLocale(int warn); jpayne@69: PyAPI_FUNC(int) _Py_LegacyLocaleDetected(int warn); jpayne@69: PyAPI_FUNC(char *) _Py_SetLocaleFromEnv(int category); jpayne@69: jpayne@69: #ifdef __cplusplus jpayne@69: } jpayne@69: #endif