* PyCObject functions adapted to PyCapsules. * * The main job here is to get rid of the improved error handling * of PyCapsules. It's a shame... */
| 544 | * of PyCapsules. It's a shame... |
| 545 | */ |
| 546 | static inline PyObject * |
| 547 | NpyCapsule_FromVoidPtr(void *ptr, void (*dtor)(PyObject *)) |
| 548 | { |
| 549 | PyObject *ret = PyCapsule_New(ptr, NULL, dtor); |
| 550 | if (ret == NULL) { |
| 551 | PyErr_Clear(); |
| 552 | } |
| 553 | return ret; |
| 554 | } |
| 555 | |
| 556 | static inline PyObject * |
| 557 | NpyCapsule_FromVoidPtrAndDesc(void *ptr, void* context, void (*dtor)(PyObject *)) |
no outgoing calls
no test coverage detected