MCPcopy Create free account
hub / github.com/numpy/numpy / NpyCapsule_FromVoidPtr

Function NpyCapsule_FromVoidPtr

numpy/core/include/numpy/npy_3kcompat.h:546–554  ·  view source on GitHub ↗

* PyCObject functions adapted to PyCapsules. * * The main job here is to get rid of the improved error handling * of PyCapsules. It's a shame... */

Source from the content-addressed store, hash-verified

544 * of PyCapsules. It's a shame...
545 */
546static inline PyObject *
547NpyCapsule_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
556static inline PyObject *
557NpyCapsule_FromVoidPtrAndDesc(void *ptr, void* context, void (*dtor)(PyObject *))

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected