Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 10:06:50

0001 
0002 /* Interfaces to configure, query, create & destroy the Python runtime */
0003 
0004 #ifndef Py_PYLIFECYCLE_H
0005 #define Py_PYLIFECYCLE_H
0006 #ifdef __cplusplus
0007 extern "C" {
0008 #endif
0009 
0010 
0011 /* Initialization and finalization */
0012 PyAPI_FUNC(void) Py_Initialize(void);
0013 PyAPI_FUNC(void) Py_InitializeEx(int);
0014 PyAPI_FUNC(void) Py_Finalize(void);
0015 #if !defined(Py_LIMITED_API) || Py_LIMITED_API+0 >= 0x03060000
0016 PyAPI_FUNC(int) Py_FinalizeEx(void);
0017 #endif
0018 PyAPI_FUNC(int) Py_IsInitialized(void);
0019 
0020 /* Subinterpreter support */
0021 PyAPI_FUNC(PyThreadState *) Py_NewInterpreter(void);
0022 PyAPI_FUNC(void) Py_EndInterpreter(PyThreadState *);
0023 
0024 
0025 /* Py_PyAtExit is for the atexit module, Py_AtExit is for low-level
0026  * exit functions.
0027  */
0028 PyAPI_FUNC(int) Py_AtExit(void (*func)(void));
0029 
0030 PyAPI_FUNC(void) _Py_NO_RETURN Py_Exit(int);
0031 
0032 /* Bootstrap __main__ (defined in Modules/main.c) */
0033 PyAPI_FUNC(int) Py_Main(int argc, wchar_t **argv);
0034 PyAPI_FUNC(int) Py_BytesMain(int argc, char **argv);
0035 
0036 /* In pathconfig.c */
0037 Py_DEPRECATED(3.11) PyAPI_FUNC(void) Py_SetProgramName(const wchar_t *);
0038 PyAPI_FUNC(wchar_t *) Py_GetProgramName(void);
0039 
0040 Py_DEPRECATED(3.11) PyAPI_FUNC(void) Py_SetPythonHome(const wchar_t *);
0041 PyAPI_FUNC(wchar_t *) Py_GetPythonHome(void);
0042 
0043 PyAPI_FUNC(wchar_t *) Py_GetProgramFullPath(void);
0044 
0045 PyAPI_FUNC(wchar_t *) Py_GetPrefix(void);
0046 PyAPI_FUNC(wchar_t *) Py_GetExecPrefix(void);
0047 PyAPI_FUNC(wchar_t *) Py_GetPath(void);
0048 Py_DEPRECATED(3.11) PyAPI_FUNC(void) Py_SetPath(const wchar_t *);
0049 #ifdef MS_WINDOWS
0050 int _Py_CheckPython3(void);
0051 #endif
0052 
0053 /* In their own files */
0054 PyAPI_FUNC(const char *) Py_GetVersion(void);
0055 PyAPI_FUNC(const char *) Py_GetPlatform(void);
0056 PyAPI_FUNC(const char *) Py_GetCopyright(void);
0057 PyAPI_FUNC(const char *) Py_GetCompiler(void);
0058 PyAPI_FUNC(const char *) Py_GetBuildInfo(void);
0059 
0060 /* Signals */
0061 typedef void (*PyOS_sighandler_t)(int);
0062 PyAPI_FUNC(PyOS_sighandler_t) PyOS_getsig(int);
0063 PyAPI_FUNC(PyOS_sighandler_t) PyOS_setsig(int, PyOS_sighandler_t);
0064 
0065 #if !defined(Py_LIMITED_API) || Py_LIMITED_API+0 >= 0x030B0000
0066 PyAPI_DATA(const unsigned long) Py_Version;
0067 #endif
0068 
0069 #ifndef Py_LIMITED_API
0070 #  define Py_CPYTHON_PYLIFECYCLE_H
0071 #  include "cpython/pylifecycle.h"
0072 #  undef Py_CPYTHON_PYLIFECYCLE_H
0073 #endif
0074 
0075 #ifdef __cplusplus
0076 }
0077 #endif
0078 #endif /* !Py_PYLIFECYCLE_H */