| 554 | } |
| 555 | |
| 556 | static inline PyObject * |
| 557 | NpyCapsule_FromVoidPtrAndDesc(void *ptr, void* context, void (*dtor)(PyObject *)) |
| 558 | { |
| 559 | PyObject *ret = NpyCapsule_FromVoidPtr(ptr, dtor); |
| 560 | if (ret != NULL && PyCapsule_SetContext(ret, context) != 0) { |
| 561 | PyErr_Clear(); |
| 562 | Py_DECREF(ret); |
| 563 | ret = NULL; |
| 564 | } |
| 565 | return ret; |
| 566 | } |
| 567 | |
| 568 | static inline void * |
| 569 | NpyCapsule_AsVoidPtr(PyObject *obj) |
nothing calls this directly
no test coverage detected