Skip to content

Commit 34ff27d

Browse files
authored
invokelatest nowadays supports kwargs (fixes #873)
1 parent bbe4efc commit 34ff27d

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

src/callback.jl

+1-6
Original file line numberDiff line numberDiff line change
@@ -29,12 +29,7 @@ function _pyjlwrap_call(f, args_::PyPtr, kw_::PyPtr)
2929
else
3030
kw = PyDict{Symbol,PyObject}(pyincref(kw_))
3131
kwargs = [ (k,julia_kwarg(f,k,v)) for (k,v) in kw ]
32-
33-
# 0.6 `invokelatest` doesn't support kwargs, instead
34-
# use a closure over kwargs. see:
35-
# https://github.com/JuliaLang/julia/pull/22646
36-
f_kw_closure() = f(jlargs...; kwargs...)
37-
ret = Core._apply_latest(f_kw_closure)
32+
ret = Base.invokelatest(f, jlargs...; kwargs...)
3833
end
3934

4035
return pyreturn(ret)

0 commit comments

Comments
 (0)