Skip to content

Commit ce0f007

Browse files
committed
Use IdSet instead of Union
1 parent e90786b commit ce0f007

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

contrib/juliac/juliac-buildscript.jl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,16 +27,16 @@ if Base.JLOptions().trim != 0
2727
include(joinpath(@__DIR__, "juliac-trim-base.jl"))
2828
end
2929

30-
const C_friendly_types = Union{ # a few of these are redundant to make it easier to maintain
30+
const C_friendly_types = Base.IdSet{Any}([ # a few of these are redundant to make it easier to maintain
3131
Int8, Int16, Int32, Int64, UInt8, UInt16, UInt32, UInt64, Float32, Float64, Bool,
3232
Cvoid, Cint, Cshort, Clong, Cuint, Cushort, Culong, Cssize_t, Csize_t,
3333
Cchar, Cwchar_t, Cstring, Cwstring,
3434
RawFD,
35-
}
35+
])
3636

3737
function is_c_friendly(@nospecialize(T::DataType))
3838
T <: Ptr && return is_c_friendly(T.parameters[1])
39-
return T <: C_friendly_types
39+
return T in C_friendly_types
4040
end
4141

4242
function recursively_add_types!(types::Base.IdSet{DataType}, @nospecialize(T::DataType))

0 commit comments

Comments
 (0)