Permalink
Browse files

ENH: 3K: add some extra NpyCapsule functions

  • Loading branch information...
1 parent 03f4cf3 commit 4fcfd09694621f2fc7aebc3ed7bf03a0a1ffbc4b @pv pv committed Jul 17, 2010
Showing with 12 additions and 0 deletions.
  1. +12 −0 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)
{

0 comments on commit 4fcfd09

Please sign in to comment.