+++ /dev/null
-\r
-/* Capsule objects let you wrap a C "void *" pointer in a Python\r
- object. They're a way of passing data through the Python interpreter\r
- without creating your own custom type.\r
-\r
- Capsules are used for communication between extension modules.\r
- They provide a way for an extension module to export a C interface\r
- to other extension modules, so that extension modules can use the\r
- Python import mechanism to link to one another.\r
-\r
- For more information, please see "c-api/capsule.html" in the\r
- documentation.\r
-*/\r
-\r
-#ifndef Py_CAPSULE_H\r
-#define Py_CAPSULE_H\r
-#ifdef __cplusplus\r
-extern "C" {\r
-#endif\r
-\r
-PyAPI_DATA(PyTypeObject) PyCapsule_Type;\r
-\r
-typedef void (*PyCapsule_Destructor)(PyObject *);\r
-\r
-#define PyCapsule_CheckExact(op) (Py_TYPE(op) == &PyCapsule_Type)\r
-\r
-\r
-PyAPI_FUNC(PyObject *) PyCapsule_New(\r
- void *pointer,\r
- const char *name,\r
- PyCapsule_Destructor destructor);\r
-\r
-PyAPI_FUNC(void *) PyCapsule_GetPointer(PyObject *capsule, const char *name);\r
-\r
-PyAPI_FUNC(PyCapsule_Destructor) PyCapsule_GetDestructor(PyObject *capsule);\r
-\r
-PyAPI_FUNC(const char *) PyCapsule_GetName(PyObject *capsule);\r
-\r
-PyAPI_FUNC(void *) PyCapsule_GetContext(PyObject *capsule);\r
-\r
-PyAPI_FUNC(int) PyCapsule_IsValid(PyObject *capsule, const char *name);\r
-\r
-PyAPI_FUNC(int) PyCapsule_SetPointer(PyObject *capsule, void *pointer);\r
-\r
-PyAPI_FUNC(int) PyCapsule_SetDestructor(PyObject *capsule, PyCapsule_Destructor destructor);\r
-\r
-PyAPI_FUNC(int) PyCapsule_SetName(PyObject *capsule, const char *name);\r
-\r
-PyAPI_FUNC(int) PyCapsule_SetContext(PyObject *capsule, void *context);\r
-\r
-PyAPI_FUNC(void *) PyCapsule_Import(const char *name, int no_block);\r
-\r
-#ifdef __cplusplus\r
-}\r
-#endif\r
-#endif /* !Py_CAPSULE_H */\r