jpayne@69: jpayne@69: /* Interfaces to configure, query, create & destroy the Python runtime */ jpayne@69: jpayne@69: #ifndef Py_PYLIFECYCLE_H jpayne@69: #define Py_PYLIFECYCLE_H jpayne@69: #ifdef __cplusplus jpayne@69: extern "C" { jpayne@69: #endif jpayne@69: jpayne@69: jpayne@69: /* Initialization and finalization */ jpayne@69: PyAPI_FUNC(void) Py_Initialize(void); jpayne@69: PyAPI_FUNC(void) Py_InitializeEx(int); jpayne@69: PyAPI_FUNC(void) Py_Finalize(void); jpayne@69: #if !defined(Py_LIMITED_API) || Py_LIMITED_API+0 >= 0x03060000 jpayne@69: PyAPI_FUNC(int) Py_FinalizeEx(void); jpayne@69: #endif jpayne@69: PyAPI_FUNC(int) Py_IsInitialized(void); jpayne@69: jpayne@69: /* Subinterpreter support */ jpayne@69: PyAPI_FUNC(PyThreadState *) Py_NewInterpreter(void); jpayne@69: PyAPI_FUNC(void) Py_EndInterpreter(PyThreadState *); jpayne@69: 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(int) Py_AtExit(void (*func)(void)); jpayne@69: jpayne@69: PyAPI_FUNC(void) _Py_NO_RETURN Py_Exit(int); jpayne@69: jpayne@69: /* Bootstrap __main__ (defined in Modules/main.c) */ jpayne@69: PyAPI_FUNC(int) Py_Main(int argc, wchar_t **argv); jpayne@69: jpayne@69: PyAPI_FUNC(int) Py_BytesMain(int argc, char **argv); jpayne@69: jpayne@69: /* In pathconfig.c */ jpayne@69: PyAPI_FUNC(void) Py_SetProgramName(const wchar_t *); jpayne@69: PyAPI_FUNC(wchar_t *) Py_GetProgramName(void); jpayne@69: jpayne@69: PyAPI_FUNC(void) Py_SetPythonHome(const wchar_t *); jpayne@69: PyAPI_FUNC(wchar_t *) Py_GetPythonHome(void); jpayne@69: jpayne@69: PyAPI_FUNC(wchar_t *) Py_GetProgramFullPath(void); jpayne@69: jpayne@69: PyAPI_FUNC(wchar_t *) Py_GetPrefix(void); jpayne@69: PyAPI_FUNC(wchar_t *) Py_GetExecPrefix(void); jpayne@69: PyAPI_FUNC(wchar_t *) Py_GetPath(void); jpayne@69: PyAPI_FUNC(void) Py_SetPath(const wchar_t *); jpayne@69: #ifdef MS_WINDOWS jpayne@69: int _Py_CheckPython3(void); jpayne@69: #endif jpayne@69: jpayne@69: /* In their own files */ jpayne@69: PyAPI_FUNC(const char *) Py_GetVersion(void); jpayne@69: PyAPI_FUNC(const char *) Py_GetPlatform(void); jpayne@69: PyAPI_FUNC(const char *) Py_GetCopyright(void); jpayne@69: PyAPI_FUNC(const char *) Py_GetCompiler(void); jpayne@69: PyAPI_FUNC(const char *) Py_GetBuildInfo(void); jpayne@69: jpayne@69: /* Signals */ jpayne@69: typedef void (*PyOS_sighandler_t)(int); jpayne@69: PyAPI_FUNC(PyOS_sighandler_t) PyOS_getsig(int); jpayne@69: PyAPI_FUNC(PyOS_sighandler_t) PyOS_setsig(int, PyOS_sighandler_t); jpayne@69: jpayne@69: #ifndef Py_LIMITED_API jpayne@69: # define Py_CPYTHON_PYLIFECYCLE_H jpayne@69: # include "cpython/pylifecycle.h" jpayne@69: # undef Py_CPYTHON_PYLIFECYCLE_H jpayne@69: #endif jpayne@69: jpayne@69: #ifdef __cplusplus jpayne@69: } jpayne@69: #endif jpayne@69: #endif /* !Py_PYLIFECYCLE_H */