deimos.python.pystate

Mirror pystate.h

Thread and interpreter state structures and their interfaces

Members

Aliases

PyThreadFrameGetter
alias PyThreadFrameGetter = PyFrameObject* function(PyThreadState* self_)

_

Py_tracefunc
alias Py_tracefunc = int function(PyObject*, PyFrameObject*, int, PyObject*)

_

_PyFrameEvalFunction
alias _PyFrameEvalFunction = PyObject* function(PyFrameObject*, int)
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.

Enums

PyGILState_STATE
enum PyGILState_STATE

_

Functions

PyGILState_Ensure
PyGILState_STATE PyGILState_Ensure()

Ensure that the current thread is ready to call the Python C API, regardless of the current state of Python, or of its thread lock. This may be called as many times as desired by a thread so long as each call is matched with a call to PyGILState_Release(). In general, other thread-state APIs may be used between _Ensure() and _Release() calls, so long as the thread-state is restored to its previous state before the Release(). For example, normal use of the Py_BEGIN_ALLOW_THREADS/ Py_END_ALLOW_THREADS macros are acceptable.

PyGILState_GetThisThreadState
PyThreadState* PyGILState_GetThisThreadState()

Helper/diagnostic function - get the current thread state for this thread. May return NULL if no GILState API has been used on the current thread. Note that the main thread always has such a thread-state, even if no auto-thread-state call has been made on the main thread.

PyGILState_Release
void PyGILState_Release(PyGILState_STATE )

Release any resources previously acquired. After this call, Python's state will be the same as it was prior to the corresponding PyGILState_Ensure() call (but generally this state will be unknown to the caller, hence the use of the GILState API.)

PyInterpreterState_Clear
void PyInterpreterState_Clear(PyInterpreterState* )

_

PyInterpreterState_Delete
void PyInterpreterState_Delete(PyInterpreterState* )

_

PyInterpreterState_GetDict
PyObject* PyInterpreterState_GetDict(PyInterpreterState* )

Availability: >=3.8

PyInterpreterState_Head
PyInterpreterState* PyInterpreterState_Head()

_

PyInterpreterState_New
PyInterpreterState* PyInterpreterState_New()

_

PyInterpreterState_Next
PyInterpreterState* PyInterpreterState_Next(PyInterpreterState* )

_

PyInterpreterState_ThreadHead
PyThreadState* PyInterpreterState_ThreadHead(PyInterpreterState* )

_

PyState_FindModule
PyObject* PyState_FindModule(PyModuleDef* )

Availability: 3.*

PyThreadState_Clear
void PyThreadState_Clear(PyThreadState* )

_

PyThreadState_Delete
void PyThreadState_Delete(PyThreadState* )

_

PyThreadState_DeleteCurrent
void PyThreadState_DeleteCurrent()

_

PyThreadState_GET
auto PyThreadState_GET()

_

PyThreadState_GET
auto PyThreadState_GET()

_

PyThreadState_GET
auto PyThreadState_GET()

_

PyThreadState_Get
PyThreadState* PyThreadState_Get()

_

PyThreadState_GetDict
PyObject_BorrowedRef* PyThreadState_GetDict()

_

PyThreadState_New
PyThreadState* PyThreadState_New(PyInterpreterState* )

_

PyThreadState_Next
PyThreadState* PyThreadState_Next(PyThreadState* )

_

PyThreadState_SetAsyncExc
int PyThreadState_SetAsyncExc(C_long , PyObject* )

_

PyThreadState_Swap
PyThreadState* PyThreadState_Swap(PyThreadState* )

_

_PyGILState_Reinit
void _PyGILState_Reinit()

Availability: 3.*

_PyState_AddModule
int _PyState_AddModule(PyObject* , PyModuleDef* )

Availability: 3.*

_PyThreadState_Init
void _PyThreadState_Init(PyThreadState* )

Availability: >= 2.6

_PyThreadState_Prealloc
PyThreadState* _PyThreadState_Prealloc(PyInterpreterState* )

Availability: >= 2.6

Manifest constants

MAX_CO_EXTRA_USERS
enum MAX_CO_EXTRA_USERS;
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
PyTrace_CALL
enum PyTrace_CALL;
PyTrace_C_CALL
enum PyTrace_C_CALL;
PyTrace_C_EXCEPTION
enum PyTrace_C_EXCEPTION;
PyTrace_C_RETURN
enum PyTrace_C_RETURN;
PyTrace_EXCEPTION
enum PyTrace_EXCEPTION;
PyTrace_LINE
enum PyTrace_LINE;
PyTrace_RETURN
enum PyTrace_RETURN;

_

Structs

PyInterpreterState
struct PyInterpreterState

_

PyThreadState
struct PyThreadState

_

_PyCoreConfig
struct _PyCoreConfig
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
_PyErr_StackItem
struct _PyErr_StackItem
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
_PyMainInterpreterConfig
struct _PyMainInterpreterConfig
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.

Meta