Skip to content

Commit 0148fd2

Browse files
author
Christopher Doris
committed
Merge branch 'main' of https://github.com/cjdoris/PythonCall.jl into main
2 parents d9db81f + 58d14ef commit 0148fd2

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/cpython/pointers.jl

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -167,6 +167,12 @@ const CAPI_FUNC_SIGS = Dict{Symbol, Pair{Tuple, Type}}(
167167
:PySlice_New => (PyPtr, PyPtr, PyPtr) => PyPtr,
168168
# METHOD
169169
:PyInstanceMethod_New => (PyPtr,) => PyPtr,
170+
# CAPSULE
171+
:PyCapsule_New => (Ptr{Cvoid}, Ptr{Cchar}, Ptr{Cvoid}) => PyPtr,
172+
:PyCapsule_GetName => (PyPtr,) => Ptr{Cchar},
173+
:PyCapsule_SetName => (PyPtr, Ptr{Cchar}) => Cint,
174+
:PyCapsule_GetPointer => (PyPtr, Ptr{Cchar}) => Ptr{Cvoid},
175+
:PyCapsule_SetDestructor => (PyPtr, Ptr{Cvoid}) => Cint,
170176
)
171177

172178
const CAPI_EXCEPTIONS = Set([
@@ -254,6 +260,7 @@ const CAPI_OBJECTS = Set([
254260
:PyUnicode_Type,
255261
:PyTuple_Type,
256262
:PyType_Type,
263+
:PyCapsule_Type,
257264
# OTHERS
258265
:_Py_TrueStruct,
259266
:_Py_FalseStruct,

0 commit comments

Comments
 (0)