Skip to content

Commit

Permalink
Example nits
Browse files Browse the repository at this point in the history
  • Loading branch information
pitrou authored Oct 18, 2023
1 parent 6ee9b78 commit 51657bb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions docs/source/format/CDataInterface/PyCapsuleInterface.rst
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,7 @@ code for ``ArrowArray`` and ``ArrowArrayStream`` is similar.
#include <Python.h>
// If the capsule is not an ArrowSchema, will return NULL.
// If the capsule is not an ArrowSchema, will return NULL and set an exception.
struct ArrowSchema* GetArrowSchemaPyCapsule(PyObject* capsule) {
return PyCapsule_GetPointer(capsule, "arrow_schema");
}
Expand All @@ -315,7 +315,7 @@ code for ``ArrowArray`` and ``ArrowArrayStream`` is similar.
cimport cpython
cdef ArrowSchema* get_arrow_schema_py_capsule(object capsule):
cdef ArrowSchema* get_arrow_schema_py_capsule(object capsule) except NULL:
return <ArrowSchema*>cpython.PyCapsule_GetPointer(capsule, 'arrow_schema')
Backwards Compatibility with PyArrow
Expand Down

0 comments on commit 51657bb

Please sign in to comment.