jpayne@69
|
1
|
jpayne@69
|
2 /* Interfaces to configure, query, create & destroy the Python runtime */
|
jpayne@69
|
3
|
jpayne@69
|
4 #ifndef Py_PYLIFECYCLE_H
|
jpayne@69
|
5 #define Py_PYLIFECYCLE_H
|
jpayne@69
|
6 #ifdef __cplusplus
|
jpayne@69
|
7 extern "C" {
|
jpayne@69
|
8 #endif
|
jpayne@69
|
9
|
jpayne@69
|
10
|
jpayne@69
|
11 /* Initialization and finalization */
|
jpayne@69
|
12 PyAPI_FUNC(void) Py_Initialize(void);
|
jpayne@69
|
13 PyAPI_FUNC(void) Py_InitializeEx(int);
|
jpayne@69
|
14 PyAPI_FUNC(void) Py_Finalize(void);
|
jpayne@69
|
15 #if !defined(Py_LIMITED_API) || Py_LIMITED_API+0 >= 0x03060000
|
jpayne@69
|
16 PyAPI_FUNC(int) Py_FinalizeEx(void);
|
jpayne@69
|
17 #endif
|
jpayne@69
|
18 PyAPI_FUNC(int) Py_IsInitialized(void);
|
jpayne@69
|
19
|
jpayne@69
|
20 /* Subinterpreter support */
|
jpayne@69
|
21 PyAPI_FUNC(PyThreadState *) Py_NewInterpreter(void);
|
jpayne@69
|
22 PyAPI_FUNC(void) Py_EndInterpreter(PyThreadState *);
|
jpayne@69
|
23
|
jpayne@69
|
24
|
jpayne@69
|
25 /* Py_PyAtExit is for the atexit module, Py_AtExit is for low-level
|
jpayne@69
|
26 * exit functions.
|
jpayne@69
|
27 */
|
jpayne@69
|
28 PyAPI_FUNC(int) Py_AtExit(void (*func)(void));
|
jpayne@69
|
29
|
jpayne@69
|
30 PyAPI_FUNC(void) _Py_NO_RETURN Py_Exit(int);
|
jpayne@69
|
31
|
jpayne@69
|
32 /* Bootstrap __main__ (defined in Modules/main.c) */
|
jpayne@69
|
33 PyAPI_FUNC(int) Py_Main(int argc, wchar_t **argv);
|
jpayne@69
|
34
|
jpayne@69
|
35 PyAPI_FUNC(int) Py_BytesMain(int argc, char **argv);
|
jpayne@69
|
36
|
jpayne@69
|
37 /* In pathconfig.c */
|
jpayne@69
|
38 PyAPI_FUNC(void) Py_SetProgramName(const wchar_t *);
|
jpayne@69
|
39 PyAPI_FUNC(wchar_t *) Py_GetProgramName(void);
|
jpayne@69
|
40
|
jpayne@69
|
41 PyAPI_FUNC(void) Py_SetPythonHome(const wchar_t *);
|
jpayne@69
|
42 PyAPI_FUNC(wchar_t *) Py_GetPythonHome(void);
|
jpayne@69
|
43
|
jpayne@69
|
44 PyAPI_FUNC(wchar_t *) Py_GetProgramFullPath(void);
|
jpayne@69
|
45
|
jpayne@69
|
46 PyAPI_FUNC(wchar_t *) Py_GetPrefix(void);
|
jpayne@69
|
47 PyAPI_FUNC(wchar_t *) Py_GetExecPrefix(void);
|
jpayne@69
|
48 PyAPI_FUNC(wchar_t *) Py_GetPath(void);
|
jpayne@69
|
49 PyAPI_FUNC(void) Py_SetPath(const wchar_t *);
|
jpayne@69
|
50 #ifdef MS_WINDOWS
|
jpayne@69
|
51 int _Py_CheckPython3(void);
|
jpayne@69
|
52 #endif
|
jpayne@69
|
53
|
jpayne@69
|
54 /* In their own files */
|
jpayne@69
|
55 PyAPI_FUNC(const char *) Py_GetVersion(void);
|
jpayne@69
|
56 PyAPI_FUNC(const char *) Py_GetPlatform(void);
|
jpayne@69
|
57 PyAPI_FUNC(const char *) Py_GetCopyright(void);
|
jpayne@69
|
58 PyAPI_FUNC(const char *) Py_GetCompiler(void);
|
jpayne@69
|
59 PyAPI_FUNC(const char *) Py_GetBuildInfo(void);
|
jpayne@69
|
60
|
jpayne@69
|
61 /* Signals */
|
jpayne@69
|
62 typedef void (*PyOS_sighandler_t)(int);
|
jpayne@69
|
63 PyAPI_FUNC(PyOS_sighandler_t) PyOS_getsig(int);
|
jpayne@69
|
64 PyAPI_FUNC(PyOS_sighandler_t) PyOS_setsig(int, PyOS_sighandler_t);
|
jpayne@69
|
65
|
jpayne@69
|
66 #ifndef Py_LIMITED_API
|
jpayne@69
|
67 # define Py_CPYTHON_PYLIFECYCLE_H
|
jpayne@69
|
68 # include "cpython/pylifecycle.h"
|
jpayne@69
|
69 # undef Py_CPYTHON_PYLIFECYCLE_H
|
jpayne@69
|
70 #endif
|
jpayne@69
|
71
|
jpayne@69
|
72 #ifdef __cplusplus
|
jpayne@69
|
73 }
|
jpayne@69
|
74 #endif
|
jpayne@69
|
75 #endif /* !Py_PYLIFECYCLE_H */
|