Skip to content

Commit 685f219

Browse files
committed
fix #261 (missing pyincref)
1 parent e5c834f commit 685f219

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/callback.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,13 +29,13 @@ end
2929

3030
function jl_Function_call(self_::PyPtr, args_::PyPtr, kw_::PyPtr)
3131
ret_ = convert(PyPtr, C_NULL)
32-
args = PyObject(args_)
32+
args = PyObject(args_) # don't need pyincref because of finally clause below
3333
try
3434
f = unsafe_pyjlwrap_to_objref(self_)::Function
3535
if kw_ == C_NULL
3636
ret = PyObject(f(convert(PyAny, args)...))
3737
else
38-
kw = PyDict{Symbol,PyAny}(PyObject(kw_))
38+
kw = PyDict{Symbol,PyAny}(pyincref(kw_))
3939
kwargs = [ (k,v) for (k,v) in kw ]
4040
ret = PyObject(f(convert(PyAny, args)...; kwargs...))
4141
end

0 commit comments

Comments
 (0)