diff options
author | alexv-smirnov <alex@ydb.tech> | 2023-06-13 11:05:01 +0300 |
---|---|---|
committer | alexv-smirnov <alex@ydb.tech> | 2023-06-13 11:05:01 +0300 |
commit | bf0f13dd39ee3e65092ba3572bb5b1fcd125dcd0 (patch) | |
tree | 1d1df72c0541a59a81439842f46d95396d3e7189 /contrib/tools/cython/Cython/Includes/cpython/pylifecycle.pxd | |
parent | 8bfdfa9a9bd19bddbc58d888e180fbd1218681be (diff) | |
download | ydb-bf0f13dd39ee3e65092ba3572bb5b1fcd125dcd0.tar.gz |
add ymake export to ydb
Diffstat (limited to 'contrib/tools/cython/Cython/Includes/cpython/pylifecycle.pxd')
-rw-r--r-- | contrib/tools/cython/Cython/Includes/cpython/pylifecycle.pxd | 68 |
1 files changed, 68 insertions, 0 deletions
diff --git a/contrib/tools/cython/Cython/Includes/cpython/pylifecycle.pxd b/contrib/tools/cython/Cython/Includes/cpython/pylifecycle.pxd new file mode 100644 index 0000000000..2c71e37163 --- /dev/null +++ b/contrib/tools/cython/Cython/Includes/cpython/pylifecycle.pxd @@ -0,0 +1,68 @@ +# Interfaces to configure, query, create & destroy the Python runtime + +from libc.stdio cimport FILE +from .pystate cimport PyThreadState + + +cdef extern from "Python.h": + ctypedef int wchar_t + + void Py_SetProgramName(wchar_t *) + wchar_t *Py_GetProgramName() + + void Py_SetPythonHome(wchar_t *) + wchar_t *Py_GetPythonHome() + + # Only used by applications that embed the interpreter and need to + # override the standard encoding determination mechanism + int Py_SetStandardStreamEncoding(const char *encoding, const char *errors) + + void Py_Initialize() + void Py_InitializeEx(int) + void _Py_InitializeEx_Private(int, int) + void Py_Finalize() + int Py_FinalizeEx() + int Py_IsInitialized() + PyThreadState *Py_NewInterpreter() + void Py_EndInterpreter(PyThreadState *) + + + # _Py_PyAtExit is for the atexit module, Py_AtExit is for low-level + # exit functions. + void _Py_PyAtExit(void (*func)(object), object) + int Py_AtExit(void (*func)()) + + void Py_Exit(int) + + # Restore signals that the interpreter has called SIG_IGN on to SIG_DFL. + void _Py_RestoreSignals() + + int Py_FdIsInteractive(FILE *, const char *) + + # Bootstrap __main__ (defined in Modules/main.c) + int Py_Main(int argc, wchar_t **argv) + + # In getpath.c + wchar_t *Py_GetProgramFullPath() + wchar_t *Py_GetPrefix() + wchar_t *Py_GetExecPrefix() + wchar_t *Py_GetPath() + void Py_SetPath(const wchar_t *) + int _Py_CheckPython3() + + # In their own files + const char *Py_GetVersion() + const char *Py_GetPlatform() + const char *Py_GetCopyright() + const char *Py_GetCompiler() + const char *Py_GetBuildInfo() + const char *_Py_gitidentifier() + const char *_Py_gitversion() + + ctypedef void (*PyOS_sighandler_t)(int) + PyOS_sighandler_t PyOS_getsig(int) + PyOS_sighandler_t PyOS_setsig(int, PyOS_sighandler_t) + + # Random + int _PyOS_URandom(void *buffer, Py_ssize_t size) + int _PyOS_URandomNonblock(void *buffer, Py_ssize_t size) |