File indexing completed on 2025-01-18 10:06:50
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015 #ifndef Py_CAPSULE_H
0016 #define Py_CAPSULE_H
0017 #ifdef __cplusplus
0018 extern "C" {
0019 #endif
0020
0021 PyAPI_DATA(PyTypeObject) PyCapsule_Type;
0022
0023 typedef void (*PyCapsule_Destructor)(PyObject *);
0024
0025 #define PyCapsule_CheckExact(op) Py_IS_TYPE((op), &PyCapsule_Type)
0026
0027
0028 PyAPI_FUNC(PyObject *) PyCapsule_New(
0029 void *pointer,
0030 const char *name,
0031 PyCapsule_Destructor destructor);
0032
0033 PyAPI_FUNC(void *) PyCapsule_GetPointer(PyObject *capsule, const char *name);
0034
0035 PyAPI_FUNC(PyCapsule_Destructor) PyCapsule_GetDestructor(PyObject *capsule);
0036
0037 PyAPI_FUNC(const char *) PyCapsule_GetName(PyObject *capsule);
0038
0039 PyAPI_FUNC(void *) PyCapsule_GetContext(PyObject *capsule);
0040
0041 PyAPI_FUNC(int) PyCapsule_IsValid(PyObject *capsule, const char *name);
0042
0043 PyAPI_FUNC(int) PyCapsule_SetPointer(PyObject *capsule, void *pointer);
0044
0045 PyAPI_FUNC(int) PyCapsule_SetDestructor(PyObject *capsule, PyCapsule_Destructor destructor);
0046
0047 PyAPI_FUNC(int) PyCapsule_SetName(PyObject *capsule, const char *name);
0048
0049 PyAPI_FUNC(int) PyCapsule_SetContext(PyObject *capsule, void *context);
0050
0051 PyAPI_FUNC(void *) PyCapsule_Import(
0052 const char *name,
0053 int no_block);
0054
0055
0056 #ifdef __cplusplus
0057 }
0058 #endif
0059 #endif