| #ifndef Py_LIMITED_API |
| #ifndef Py_CONTEXT_H |
| #define Py_CONTEXT_H |
| #ifdef __cplusplus |
| extern "C" { |
| #endif |
|
|
| PyAPI_DATA(PyTypeObject) PyContext_Type; |
| typedef struct _pycontextobject PyContext; |
|
|
| PyAPI_DATA(PyTypeObject) PyContextVar_Type; |
| typedef struct _pycontextvarobject PyContextVar; |
|
|
| PyAPI_DATA(PyTypeObject) PyContextToken_Type; |
| typedef struct _pycontexttokenobject PyContextToken; |
|
|
|
|
| #define PyContext_CheckExact(o) Py_IS_TYPE(o, &PyContext_Type) |
| #define PyContextVar_CheckExact(o) Py_IS_TYPE(o, &PyContextVar_Type) |
| #define PyContextToken_CheckExact(o) Py_IS_TYPE(o, &PyContextToken_Type) |
|
|
|
|
| PyAPI_FUNC(PyObject *) PyContext_New(void); |
| PyAPI_FUNC(PyObject *) PyContext_Copy(PyObject *); |
| PyAPI_FUNC(PyObject *) PyContext_CopyCurrent(void); |
|
|
| PyAPI_FUNC(int) PyContext_Enter(PyObject *); |
| PyAPI_FUNC(int) PyContext_Exit(PyObject *); |
|
|
|
|
| |
| |
| |
| |
| PyAPI_FUNC(PyObject *) PyContextVar_New( |
| const char *name, PyObject *default_value); |
|
|
|
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| PyAPI_FUNC(int) PyContextVar_Get( |
| PyObject *var, PyObject *default_value, PyObject **value); |
|
|
|
|
| |
| |
| |
| PyAPI_FUNC(PyObject *) PyContextVar_Set(PyObject *var, PyObject *value); |
|
|
|
|
| |
| |
| |
| PyAPI_FUNC(int) PyContextVar_Reset(PyObject *var, PyObject *token); |
|
|
|
|
| |
| PyAPI_FUNC(PyObject *) _PyContext_NewHamtForTests(void); |
|
|
|
|
| #ifdef __cplusplus |
| } |
| #endif |
| #endif |
| #endif |
|
|