File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -141,11 +141,11 @@ function Base.Symbol(x::T) where {T <: InlineString}
141141end
142142
143143Base. cconvert (:: Type{Ptr{UInt8}} , x:: T ) where {T <: InlineString } =
144- Ref {T} (_bswap (clear_n_bytes (x, 1 ) ))
144+ Ref {T} (_bswap (x ))
145145Base. cconvert (:: Type{Ptr{Int8}} , x:: T ) where {T <: InlineString } =
146- Ref {T} (_bswap (clear_n_bytes (x, 1 ) ))
146+ Ref {T} (_bswap (x ))
147147function Base. cconvert (:: Type{Cstring} , x:: T ) where {T <: InlineString }
148- ref = Ref {T} (_bswap (clear_n_bytes (x, 1 ) ))
148+ ref = Ref {T} (_bswap (x ))
149149 Base. containsnul (Ptr {Int8} (pointer_from_objref (ref)), sizeof (x)) &&
150150 throw (ArgumentError (" embedded NULs are not allowed in C strings: $x " ))
151151 return ref
177177
178178# add a codeunit to end of string method
179179function addcodeunit (x:: T , b:: UInt8 ) where {T <: InlineString }
180- len = ncodeunits (x) % UInt8
180+ len = Base . trunc_int (UInt8, ncodeunits (x))
181181 sz = Base. trunc_int (UInt8, sizeof (T))
182182 shf = Base. zext_int (Int16, max (0x01 , sz - len - 0x01 )) << 3
183183 x = Base. or_int (x, Base. shl_int (Base. zext_int (T, b), shf))
You can’t perform that action at this time.
0 commit comments