deimos.python.pycapsule

Mirror pycapsule.h

Capsule objects let you wrap a C "void *" pointer in a Python object. They're a way of passing data through the Python interpreter without creating your own custom type.

Capsules are used for communication between extension modules. They provide a way for an extension module to export a C interface to other extension modules, so that extension modules can use the Python import mechanism to link to one another.

This was introduced in python 2.7

Members

Aliases

PyCapsule_Destructor
alias PyCapsule_Destructor = void function(PyObject*)

Availability: >= 2.7

Functions

PyCapsule_CheckExact
int PyCapsule_CheckExact(PyObject* op)

Availability: >= 2.7

PyCapsule_GetContext
void* PyCapsule_GetContext(PyObject* capsule)

Availability: >= 2.7

PyCapsule_GetDestructor
PyCapsule_Destructor PyCapsule_GetDestructor(PyObject* capsule)

Availability: >= 2.7

PyCapsule_GetName
const(char)* PyCapsule_GetName(PyObject* capsule)

Availability: >= 2.7

PyCapsule_GetPointer
void* PyCapsule_GetPointer(PyObject* capsule, const(char)* name)

Availability: >= 2.7

PyCapsule_Import
void* PyCapsule_Import(const(char)* name, int no_block)

Availability: >= 2.7

PyCapsule_IsValid
int PyCapsule_IsValid(PyObject* capsule, const(char)* name)

Availability: >= 2.7

PyCapsule_New
PyObject* PyCapsule_New(void* pointer, const(char)* name, PyCapsule_Destructor destructor)

Availability: >= 2.7

PyCapsule_SetContext
int PyCapsule_SetContext(PyObject* capsule, void* context)

Availability: >= 2.7

PyCapsule_SetDestructor
int PyCapsule_SetDestructor(PyObject* capsule, PyCapsule_Destructor destructor)

Availability: >= 2.7

PyCapsule_SetName
int PyCapsule_SetName(PyObject* capsule, const(char)* name)

Availability: >= 2.7

PyCapsule_SetPointer
int PyCapsule_SetPointer(PyObject* capsule, void* pointer)

Availability: >= 2.7

See Also

Meta