2018-11-01 02:15:58 +00:00
|
|
|
#ifndef Py_INTERNAL_LIFECYCLE_H
|
|
|
|
#define Py_INTERNAL_LIFECYCLE_H
|
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
2019-04-17 21:02:26 +00:00
|
|
|
#ifndef Py_BUILD_CORE
|
|
|
|
# error "this header requires Py_BUILD_CORE define"
|
2018-11-01 02:15:58 +00:00
|
|
|
#endif
|
|
|
|
|
2019-04-24 15:24:01 +00:00
|
|
|
#include "pycore_pystate.h" /* _PyRuntimeState */
|
|
|
|
|
2019-02-16 20:57:40 +00:00
|
|
|
/* True if the main interpreter thread exited due to an unhandled
|
|
|
|
* KeyboardInterrupt exception, suggesting the user pressed ^C. */
|
|
|
|
PyAPI_DATA(int) _Py_UnhandledKeyboardInterrupt;
|
|
|
|
|
2018-11-01 02:15:58 +00:00
|
|
|
PyAPI_FUNC(int) _Py_UnixMain(int argc, char **argv);
|
|
|
|
|
2019-05-02 15:54:20 +00:00
|
|
|
extern int _Py_SetFileSystemEncoding(
|
2018-11-01 02:15:58 +00:00
|
|
|
const char *encoding,
|
|
|
|
const char *errors);
|
2019-05-02 15:54:20 +00:00
|
|
|
extern void _Py_ClearFileSystemEncoding(void);
|
|
|
|
extern _PyInitError _PyUnicode_InitEncodings(PyInterpreterState *interp);
|
2018-11-01 02:15:58 +00:00
|
|
|
|
|
|
|
PyAPI_FUNC(void) _Py_ClearStandardStreamEncoding(void);
|
|
|
|
|
|
|
|
PyAPI_FUNC(int) _Py_IsLocaleCoercionTarget(const char *ctype_loc);
|
|
|
|
|
2019-01-22 16:39:03 +00:00
|
|
|
/* Various one-time initializers */
|
|
|
|
|
|
|
|
extern _PyInitError _PyUnicode_Init(void);
|
2018-11-01 02:15:58 +00:00
|
|
|
extern int _PyStructSequence_Init(void);
|
|
|
|
extern int _PyLong_Init(void);
|
|
|
|
extern _PyInitError _PyFaulthandler_Init(int enable);
|
|
|
|
extern int _PyTraceMalloc_Init(int enable);
|
2019-01-22 16:39:03 +00:00
|
|
|
extern PyObject * _PyBuiltin_Init(void);
|
2019-01-23 14:04:40 +00:00
|
|
|
extern _PyInitError _PySys_Create(
|
2019-04-24 16:23:53 +00:00
|
|
|
_PyRuntimeState *runtime,
|
2019-01-23 14:04:40 +00:00
|
|
|
PyInterpreterState *interp,
|
|
|
|
PyObject **sysmod_p);
|
|
|
|
extern _PyInitError _PySys_SetPreliminaryStderr(PyObject *sysdict);
|
2019-04-24 16:23:53 +00:00
|
|
|
extern int _PySys_InitMain(
|
|
|
|
_PyRuntimeState *runtime,
|
|
|
|
PyInterpreterState *interp);
|
2019-01-22 16:39:03 +00:00
|
|
|
extern _PyInitError _PyImport_Init(PyInterpreterState *interp);
|
2019-01-22 20:18:05 +00:00
|
|
|
extern _PyInitError _PyExc_Init(void);
|
|
|
|
extern _PyInitError _PyBuiltins_AddExceptions(PyObject * bltinmod);
|
2019-01-22 16:39:03 +00:00
|
|
|
extern _PyInitError _PyImportHooks_Init(void);
|
|
|
|
extern int _PyFloat_Init(void);
|
|
|
|
extern _PyInitError _Py_HashRandomization_Init(const _PyCoreConfig *);
|
2018-11-01 02:15:58 +00:00
|
|
|
|
2019-01-23 14:04:40 +00:00
|
|
|
extern _PyInitError _PyTypes_Init(void);
|
2018-11-01 02:15:58 +00:00
|
|
|
|
2019-01-22 16:39:03 +00:00
|
|
|
/* Various internal finalizers */
|
|
|
|
|
|
|
|
extern void PyMethod_Fini(void);
|
|
|
|
extern void PyFrame_Fini(void);
|
|
|
|
extern void PyCFunction_Fini(void);
|
|
|
|
extern void PyDict_Fini(void);
|
|
|
|
extern void PyTuple_Fini(void);
|
|
|
|
extern void PyList_Fini(void);
|
|
|
|
extern void PySet_Fini(void);
|
|
|
|
extern void PyBytes_Fini(void);
|
|
|
|
extern void PyFloat_Fini(void);
|
|
|
|
extern void PyOS_FiniInterrupts(void);
|
|
|
|
extern void PySlice_Fini(void);
|
|
|
|
extern void PyAsyncGen_Fini(void);
|
|
|
|
|
|
|
|
extern void _PyExc_Fini(void);
|
|
|
|
extern void _PyImport_Fini(void);
|
|
|
|
extern void _PyImport_Fini2(void);
|
2019-04-24 15:24:01 +00:00
|
|
|
extern void _PyGC_Fini(_PyRuntimeState *runtime);
|
2019-01-22 16:39:03 +00:00
|
|
|
extern void _PyType_Fini(void);
|
|
|
|
extern void _Py_HashRandomization_Fini(void);
|
2018-11-01 02:15:58 +00:00
|
|
|
extern void _PyUnicode_Fini(void);
|
|
|
|
extern void PyLong_Fini(void);
|
|
|
|
extern void _PyFaulthandler_Fini(void);
|
|
|
|
extern void _PyHash_Fini(void);
|
|
|
|
extern int _PyTraceMalloc_Fini(void);
|
2019-04-26 03:49:26 +00:00
|
|
|
extern void _PyWarnings_Fini(_PyRuntimeState *runtime);
|
2018-11-01 02:15:58 +00:00
|
|
|
|
2019-04-24 16:23:53 +00:00
|
|
|
extern void _PyGILState_Init(
|
|
|
|
_PyRuntimeState *runtime,
|
|
|
|
PyInterpreterState *interp,
|
|
|
|
PyThreadState *tstate);
|
2019-04-24 15:24:01 +00:00
|
|
|
extern void _PyGILState_Fini(_PyRuntimeState *runtime);
|
2018-11-01 02:15:58 +00:00
|
|
|
|
2019-04-26 00:32:01 +00:00
|
|
|
PyAPI_FUNC(void) _PyGC_DumpShutdownStats(_PyRuntimeState *runtime);
|
2018-11-01 02:15:58 +00:00
|
|
|
|
2019-03-27 12:40:14 +00:00
|
|
|
PyAPI_FUNC(_PyInitError) _Py_PreInitializeFromCoreConfig(
|
|
|
|
const _PyCoreConfig *coreconfig);
|
2019-03-26 01:31:11 +00:00
|
|
|
|
2018-11-01 02:15:58 +00:00
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
#endif /* !Py_INTERNAL_LIFECYCLE_H */
|