Skip to content

Commit 24a2bd0

Browse files
author
Christopher Doris
committed
bugfix
1 parent c72434f commit 24a2bd0

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/juliacall.jl

+4-2
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,10 @@ function pyconvert_rule_jlas(::Type{T}, x::Py) where {T}
5050
S = _pyjl_getvalue(t)
5151
pydel!(t)
5252
S isa Type || return pyconvert_unconverted()
53-
# convert x to S, then to T
54-
r = pytryconvert(S, x)
53+
# convert x.value to S, then to T
54+
v = x.value
55+
r = pytryconvert(S, v)
56+
pydel!(v)
5557
if pyconvert_isunconverted(r)
5658
return pyconvert_unconverted()
5759
elseif T == Any || S <: T

0 commit comments

Comments
 (0)