Skip to content

Commit

Permalink
Make sure to call jl_islayout_inline() even in the case assertion is …
Browse files Browse the repository at this point in the history
…deactivated (#30615)
  • Loading branch information
petershintech authored and ararslan committed Jan 6, 2019
1 parent 6d2425b commit 2931072
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion base/array.jl
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,8 @@ julia> Base.bitsunionsize(Union{Float64, UInt8, Int128})
function bitsunionsize(u::Union)
sz = Ref{Csize_t}(0)
algn = Ref{Csize_t}(0)
@assert ccall(:jl_islayout_inline, Cint, (Any, Ptr{Csize_t}, Ptr{Csize_t}), u, sz, algn) != Cint(0)
isunboxed = ccall(:jl_islayout_inline, Cint, (Any, Ptr{Csize_t}, Ptr{Csize_t}), u, sz, algn)
@assert isunboxed != Cint(0)
return sz[]
end

Expand Down

0 comments on commit 2931072

Please sign in to comment.