We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 28ea9d1 commit 2c2c95aCopy full SHA for 2c2c95a
src/JlWrap/C.jl
@@ -64,6 +64,7 @@ function _pyjl_callmethod(o::C.PyPtr, args::C.PyPtr)
64
end
65
66
const PYJLBUFCACHE = Dict{Ptr{Cvoid},Any}()
67
+const PYJLBUFCACHE_DEBUG = []
68
69
@kwdef struct PyBufferInfo{N}
70
# data
@@ -177,7 +178,9 @@ function _pyjl_get_buffer_impl(
177
178
179
# internal
180
cptr = Base.pointer_from_objref(c)
181
+ @assert !haskey(PYJLBUFCACHE, cptr)
182
PYJLBUFCACHE[cptr] = c
183
+ push!(PYJLBUFCACHE_DEBUG, c)
184
b.internal[] = cptr
185
186
# obj
0 commit comments