Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

ENH: 3K: add some extra NpyCapsule functions

  • Loading branch information...
commit 4fcfd09694621f2fc7aebc3ed7bf03a0a1ffbc4b 1 parent 03f4cf3
@pv pv authored
Showing with 12 additions and 0 deletions.
  1. +12 −0 numpy/core/include/numpy/npy_3kcompat.h
View
12 numpy/core/include/numpy/npy_3kcompat.h
@@ -269,6 +269,12 @@ NpyCapsule_AsVoidPtr(PyObject *obj)
return ret;
}
+static NPY_INLINE void *
+NpyCapsule_GetDesc(PyObject *obj)
+{
+ return PyCapsule_GetContext(obj);
+}
+
static NPY_INLINE int
NpyCapsule_Check(PyObject *ptr)
{
@@ -302,6 +308,12 @@ NpyCapsule_AsVoidPtr(PyObject *ptr)
return PyCObject_AsVoidPtr(ptr);
}
+static NPY_INLINE void *
+NpyCapsule_GetDesc(PyObject *obj)
+{
+ return PyCObject_GetDesc(obj);
+}
+
static NPY_INLINE int
NpyCapsule_Check(PyObject *ptr)
{
Please sign in to comment.
Something went wrong with that request. Please try again.