Skip to content

Commit

Permalink
fixup! pass the environment stack to precompile workers via serializa…
Browse files Browse the repository at this point in the history
…tion
  • Loading branch information
KristofferC committed Nov 9, 2022
1 parent ce24d02 commit 47c3edf
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions stdlib/Serialization/src/Serialization.jl
Original file line number Diff line number Diff line change
Expand Up @@ -1474,7 +1474,7 @@ function deserialize_string(s::AbstractSerializer, len::Int)
end

# default DataType deserializer
function deserialize(s::AbstractSerializer, ::Type{T}) where {T}
function deserialize(s::AbstractSerializer, t::DataType)
nf = length(t.types)
if isprimitivetype(t)
return read(s.io, t)
Expand All @@ -1489,7 +1489,7 @@ function deserialize(s::AbstractSerializer, ::Type{T}) where {T}
end
return x
elseif nf == 0
return ccall(:jl_new_struct_uninit, Any, (Any,), T)
return ccall(:jl_new_struct_uninit, Any, (Any,), t)
else
na = nf
vflds = Vector{Any}(undef, nf)
Expand All @@ -1502,7 +1502,7 @@ function deserialize(s::AbstractSerializer, ::Type{T}) where {T}
na >= i && (na = i - 1) # rest of tail must be undefined values
end
end
return ccall(:jl_new_structv, Any, (Any, Ptr{Any}, UInt32), T, vflds, na)
return ccall(:jl_new_structv, Any, (Any, Ptr{Any}, UInt32), t, vflds, na)
end
end

Expand Down

0 comments on commit 47c3edf

Please sign in to comment.