annotate DEPENDENCIES/mingw32/Python27/include/pycapsule.h @ 133:4acb5d8d80b6 tip

Don't fail environmental check if README.md exists (but .txt and no-suffix don't)
author Chris Cannam
date Tue, 30 Jul 2019 12:25:44 +0100
parents 2a2c65a20a8b
children
rev   line source
Chris@87 1
Chris@87 2 /* Capsule objects let you wrap a C "void *" pointer in a Python
Chris@87 3 object. They're a way of passing data through the Python interpreter
Chris@87 4 without creating your own custom type.
Chris@87 5
Chris@87 6 Capsules are used for communication between extension modules.
Chris@87 7 They provide a way for an extension module to export a C interface
Chris@87 8 to other extension modules, so that extension modules can use the
Chris@87 9 Python import mechanism to link to one another.
Chris@87 10
Chris@87 11 For more information, please see "c-api/capsule.html" in the
Chris@87 12 documentation.
Chris@87 13 */
Chris@87 14
Chris@87 15 #ifndef Py_CAPSULE_H
Chris@87 16 #define Py_CAPSULE_H
Chris@87 17 #ifdef __cplusplus
Chris@87 18 extern "C" {
Chris@87 19 #endif
Chris@87 20
Chris@87 21 PyAPI_DATA(PyTypeObject) PyCapsule_Type;
Chris@87 22
Chris@87 23 typedef void (*PyCapsule_Destructor)(PyObject *);
Chris@87 24
Chris@87 25 #define PyCapsule_CheckExact(op) (Py_TYPE(op) == &PyCapsule_Type)
Chris@87 26
Chris@87 27
Chris@87 28 PyAPI_FUNC(PyObject *) PyCapsule_New(
Chris@87 29 void *pointer,
Chris@87 30 const char *name,
Chris@87 31 PyCapsule_Destructor destructor);
Chris@87 32
Chris@87 33 PyAPI_FUNC(void *) PyCapsule_GetPointer(PyObject *capsule, const char *name);
Chris@87 34
Chris@87 35 PyAPI_FUNC(PyCapsule_Destructor) PyCapsule_GetDestructor(PyObject *capsule);
Chris@87 36
Chris@87 37 PyAPI_FUNC(const char *) PyCapsule_GetName(PyObject *capsule);
Chris@87 38
Chris@87 39 PyAPI_FUNC(void *) PyCapsule_GetContext(PyObject *capsule);
Chris@87 40
Chris@87 41 PyAPI_FUNC(int) PyCapsule_IsValid(PyObject *capsule, const char *name);
Chris@87 42
Chris@87 43 PyAPI_FUNC(int) PyCapsule_SetPointer(PyObject *capsule, void *pointer);
Chris@87 44
Chris@87 45 PyAPI_FUNC(int) PyCapsule_SetDestructor(PyObject *capsule, PyCapsule_Destructor destructor);
Chris@87 46
Chris@87 47 PyAPI_FUNC(int) PyCapsule_SetName(PyObject *capsule, const char *name);
Chris@87 48
Chris@87 49 PyAPI_FUNC(int) PyCapsule_SetContext(PyObject *capsule, void *context);
Chris@87 50
Chris@87 51 PyAPI_FUNC(void *) PyCapsule_Import(const char *name, int no_block);
Chris@87 52
Chris@87 53 #ifdef __cplusplus
Chris@87 54 }
Chris@87 55 #endif
Chris@87 56 #endif /* !Py_CAPSULE_H */