| 
									
										
										
										
											2014-11-20 21:39:37 +10:00
										 |  |  | 
 | 
					
						
							|  |  |  | /* Interfaces to configure, query, create & destroy the Python runtime */ | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | #ifndef Py_PYLIFECYCLE_H
 | 
					
						
							|  |  |  | #define Py_PYLIFECYCLE_H
 | 
					
						
							|  |  |  | #ifdef __cplusplus
 | 
					
						
							|  |  |  | extern "C" { | 
					
						
							|  |  |  | #endif
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2017-05-23 21:46:51 -07:00
										 |  |  | /* Initialization and finalization */ | 
					
						
							| 
									
										
										
										
											2014-11-20 21:39:37 +10:00
										 |  |  | PyAPI_FUNC(void) Py_Initialize(void); | 
					
						
							|  |  |  | PyAPI_FUNC(void) Py_InitializeEx(int); | 
					
						
							|  |  |  | PyAPI_FUNC(void) Py_Finalize(void); | 
					
						
							| 
									
										
										
										
											2018-12-20 15:11:03 -06:00
										 |  |  | #if !defined(Py_LIMITED_API) || Py_LIMITED_API+0 >= 0x03060000
 | 
					
						
							| 
									
										
										
										
											2015-11-30 03:18:29 +00:00
										 |  |  | PyAPI_FUNC(int) Py_FinalizeEx(void); | 
					
						
							| 
									
										
										
										
											2018-12-20 15:11:03 -06:00
										 |  |  | #endif
 | 
					
						
							| 
									
										
										
										
											2014-11-20 21:39:37 +10:00
										 |  |  | PyAPI_FUNC(int) Py_IsInitialized(void); | 
					
						
							| 
									
										
										
										
											2017-05-23 21:46:51 -07:00
										 |  |  | 
 | 
					
						
							|  |  |  | /* Subinterpreter support */ | 
					
						
							| 
									
										
										
										
											2014-11-20 21:39:37 +10:00
										 |  |  | PyAPI_FUNC(PyThreadState *) Py_NewInterpreter(void); | 
					
						
							|  |  |  | PyAPI_FUNC(void) Py_EndInterpreter(PyThreadState *); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | /* Py_PyAtExit is for the atexit module, Py_AtExit is for low-level
 | 
					
						
							|  |  |  |  * exit functions. | 
					
						
							|  |  |  |  */ | 
					
						
							|  |  |  | PyAPI_FUNC(int) Py_AtExit(void (*func)(void)); | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2018-08-01 16:41:25 +02:00
										 |  |  | PyAPI_FUNC(void) _Py_NO_RETURN Py_Exit(int); | 
					
						
							| 
									
										
										
										
											2014-11-20 21:39:37 +10:00
										 |  |  | 
 | 
					
						
							|  |  |  | /* Bootstrap __main__ (defined in Modules/main.c) */ | 
					
						
							|  |  |  | PyAPI_FUNC(int) Py_Main(int argc, wchar_t **argv); | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2018-11-17 20:41:48 -08:00
										 |  |  | /* In pathconfig.c */ | 
					
						
							|  |  |  | PyAPI_FUNC(void) Py_SetProgramName(const wchar_t *); | 
					
						
							|  |  |  | PyAPI_FUNC(wchar_t *) Py_GetProgramName(void); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | PyAPI_FUNC(void) Py_SetPythonHome(const wchar_t *); | 
					
						
							|  |  |  | PyAPI_FUNC(wchar_t *) Py_GetPythonHome(void); | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2014-11-20 21:39:37 +10:00
										 |  |  | PyAPI_FUNC(wchar_t *) Py_GetProgramFullPath(void); | 
					
						
							| 
									
										
										
										
											2018-11-17 20:41:48 -08:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2014-11-20 21:39:37 +10:00
										 |  |  | PyAPI_FUNC(wchar_t *) Py_GetPrefix(void); | 
					
						
							|  |  |  | PyAPI_FUNC(wchar_t *) Py_GetExecPrefix(void); | 
					
						
							|  |  |  | PyAPI_FUNC(wchar_t *) Py_GetPath(void); | 
					
						
							|  |  |  | PyAPI_FUNC(void)      Py_SetPath(const wchar_t *); | 
					
						
							|  |  |  | #ifdef MS_WINDOWS
 | 
					
						
							| 
									
										
										
										
											2017-12-04 13:39:15 +01:00
										 |  |  | int _Py_CheckPython3(void); | 
					
						
							| 
									
										
										
										
											2014-11-20 21:39:37 +10:00
										 |  |  | #endif
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | /* In their own files */ | 
					
						
							|  |  |  | PyAPI_FUNC(const char *) Py_GetVersion(void); | 
					
						
							|  |  |  | PyAPI_FUNC(const char *) Py_GetPlatform(void); | 
					
						
							|  |  |  | PyAPI_FUNC(const char *) Py_GetCopyright(void); | 
					
						
							|  |  |  | PyAPI_FUNC(const char *) Py_GetCompiler(void); | 
					
						
							|  |  |  | PyAPI_FUNC(const char *) Py_GetBuildInfo(void); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | /* Signals */ | 
					
						
							|  |  |  | typedef void (*PyOS_sighandler_t)(int); | 
					
						
							|  |  |  | PyAPI_FUNC(PyOS_sighandler_t) PyOS_getsig(int); | 
					
						
							|  |  |  | PyAPI_FUNC(PyOS_sighandler_t) PyOS_setsig(int, PyOS_sighandler_t); | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2016-09-11 11:03:14 +03:00
										 |  |  | #ifndef Py_LIMITED_API
 | 
					
						
							| 
									
										
										
										
											2018-11-27 00:12:05 +01:00
										 |  |  | #  define Py_CPYTHON_PYLIFECYCLE_H
 | 
					
						
							|  |  |  | #  include  "cpython/pylifecycle.h"
 | 
					
						
							|  |  |  | #  undef Py_CPYTHON_PYLIFECYCLE_H
 | 
					
						
							| 
									
										
										
										
											2017-10-27 11:46:03 +02:00
										 |  |  | #endif
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2014-11-20 21:39:37 +10:00
										 |  |  | #ifdef __cplusplus
 | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | #endif
 | 
					
						
							|  |  |  | #endif /* !Py_PYLIFECYCLE_H */
 |