cython

Форк
0
/
pylifecycle.pxd 
68 строк · 2.0 Кб
1
# Interfaces to configure, query, create & destroy the Python runtime
2

3
from libc.stdio cimport FILE
4
from .pystate cimport PyThreadState
5

6

7
cdef extern from "Python.h":
8
    ctypedef int wchar_t
9

10
    void Py_SetProgramName(wchar_t *)
11
    wchar_t *Py_GetProgramName()
12

13
    void Py_SetPythonHome(wchar_t *)
14
    wchar_t *Py_GetPythonHome()
15

16
    # Only used by applications that embed the interpreter and need to
17
    # override the standard encoding determination mechanism
18
    int Py_SetStandardStreamEncoding(const char *encoding, const char *errors)
19

20
    void Py_Initialize()
21
    void Py_InitializeEx(int)
22
    void _Py_InitializeEx_Private(int, int)
23
    void Py_Finalize()
24
    int Py_FinalizeEx()
25
    int Py_IsInitialized()
26
    PyThreadState *Py_NewInterpreter()
27
    void Py_EndInterpreter(PyThreadState *)
28

29

30
    # _Py_PyAtExit is for the atexit module, Py_AtExit is for low-level
31
    # exit functions.
32
    void _Py_PyAtExit(void (*func)(object), object)
33
    int Py_AtExit(void (*func)())
34

35
    void Py_Exit(int)
36

37
    # Restore signals that the interpreter has called SIG_IGN on to SIG_DFL.
38
    void _Py_RestoreSignals()
39

40
    int Py_FdIsInteractive(FILE *, const char *)
41

42
    # Bootstrap __main__ (defined in Modules/main.c)
43
    int Py_Main(int argc, wchar_t **argv)
44

45
    # In getpath.c
46
    wchar_t *Py_GetProgramFullPath()
47
    wchar_t *Py_GetPrefix()
48
    wchar_t *Py_GetExecPrefix()
49
    wchar_t *Py_GetPath()
50
    void Py_SetPath(const wchar_t *)
51
    int _Py_CheckPython3()
52

53
    # In their own files
54
    const char *Py_GetVersion()
55
    const char *Py_GetPlatform()
56
    const char *Py_GetCopyright()
57
    const char *Py_GetCompiler()
58
    const char *Py_GetBuildInfo()
59
    const char *_Py_gitidentifier()
60
    const char *_Py_gitversion()
61

62
    ctypedef void (*PyOS_sighandler_t)(int)
63
    PyOS_sighandler_t PyOS_getsig(int)
64
    PyOS_sighandler_t PyOS_setsig(int, PyOS_sighandler_t)
65

66
    # Random
67
    int _PyOS_URandom(void *buffer, Py_ssize_t size)
68
    int _PyOS_URandomNonblock(void *buffer, Py_ssize_t size)
69

Использование cookies

Мы используем файлы cookie в соответствии с Политикой конфиденциальности и Политикой использования cookies.

Нажимая кнопку «Принимаю», Вы даете АО «СберТех» согласие на обработку Ваших персональных данных в целях совершенствования нашего веб-сайта и Сервиса GitVerse, а также повышения удобства их использования.

Запретить использование cookies Вы можете самостоятельно в настройках Вашего браузера.