Skip to content

Commit f70fe69

Browse files
committed
fix #670
1 parent 33f07eb commit f70fe69

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/pytype.jl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -413,7 +413,8 @@ const Py_TPFLAGS_HAVE_STACKLESS_EXTENSION = Ref(0x00000000)
413413
function pyjlwrap_type!(init::Function, to::PyTypeObject, name::AbstractString)
414414
sz = sizeof(Py_jlWrap) + sizeof(PyPtr) # must be > base type
415415
PyTypeObject!(to, name, sz) do t::PyTypeObject
416-
t.tp_base = ccall(:jl_value_ptr, Ptr{Cvoid}, (Ref{PyTypeObject},), jlWrapType)
416+
# need Any here: see JuliaLang/julia#31473 and #670
417+
t.tp_base = ccall(:jl_value_ptr, Ptr{Cvoid}, (Any,), jlWrapType)
417418
ccall((@pysym :Py_IncRef), Cvoid, (Any,), jlWrapType)
418419
init(t)
419420
end

0 commit comments

Comments
 (0)