Skip to content

Commit 83aa5dc

Browse files
committed
Fix 32-bit
1 parent d058b45 commit 83aa5dc

File tree

4 files changed

+9
-9
lines changed

4 files changed

+9
-9
lines changed

src/Parsers.jl

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -384,7 +384,7 @@ end
384384
end
385385
parse!(q.next, io, r; kwargs...)
386386
# @debug "Quoted - $T: result.code=$(result.code), result.result=$(result.result)"
387-
quoted && (setfield!(r, 3, pos); handlequoted!(q, io, r))
387+
quoted && (setfield!(r, 3, Int(pos)); handlequoted!(q, io, r))
388388
return r
389389
end
390390

@@ -419,7 +419,7 @@ end
419419

420420
@inline function parse!(s::Strip, io::IO, r::Result{T}; kwargs...) where {T}
421421
# @debug "xparse Strip - $T"
422-
pos = position(io)
422+
pos = Int(position(io))
423423
stripped = wh!(io, s.wh1, s.wh2)
424424
parse!(s.next, io, r; kwargs...)
425425
# @debug "Strip - $T: result.code=$(result.code), result.result=$(result.result), result.b=$(result.b)"
@@ -472,7 +472,7 @@ const TEN = UInt8('9')+UInt8(1)
472472
@inline function defaultparser(io::IO, r::Result{T}; kwargs...) where {T <: Integer}
473473
# @debug "xparse Int"
474474
setfield!(r, 1, missing)
475-
setfield!(r, 3, position(io))
475+
setfield!(r, 3, Int(position(io)))
476476
# r.result = missing
477477
eof(io) && (r.code |= INVALID | EOF; return r)
478478
v = zero(T)
@@ -516,14 +516,14 @@ const BOOLS = Trie(["true"=>true, "false"=>false])
516516

517517
@inline function defaultparser(io::IO, r::Result{Bool}; bools::Trie=BOOLS, kwargs...)
518518
setfield!(r, 1, missing)
519-
setfield!(r, 3, position(io))
519+
setfield!(r, 3, Int(position(io)))
520520
if !match!(bools, io, r)
521521
r.code |= INVALID
522522
end
523523
return r
524524
end
525525

526-
defaultparser(io::IO, r::Result{Missing}; kwargs...) = (setfield!(r, 3, position(io)); return r)
527-
defaultparser(io::IO, r::Result{Union{}}; kwargs...) = (setfield!(r, 3, position(io)); return r)
526+
defaultparser(io::IO, r::Result{Missing}; kwargs...) = (setfield!(r, 3, Int(position(io))); return r)
527+
defaultparser(io::IO, r::Result{Union{}}; kwargs...) = (setfield!(r, 3, Int(position(io))); return r)
528528

529529
end # module

src/dates.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ make(df::String) = Dates.DateFormat(df)
1616
delims=nothing, openquotechar=nothing, closequotechar=nothing, escapechar=nothing, node=nothing;
1717
dateformat::Union{String, Dates.DateFormat}=Dates.default_format(T),
1818
kwargs...) where {T <: Dates.TimeType}
19-
setfield!(r, 3, position(io))
19+
setfield!(r, 3, Int(position(io)))
2020
res = defaultparser(io, Result(String), delims, openquotechar, closequotechar, escapechar, node)
2121
setfield!(r, 1, missing)
2222
code = res.code

src/floats.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ const SPECIALS = Trie(["nan"=>NaN, "infinity"=>Inf, "inf"=>Inf])
9090

9191
@inline function defaultparser(io::IO, r::Result{T}; decimal::Union{Char, UInt8}=UInt8('.'), kwargs...) where {T <: Union{Float16, Float32, Float64}}
9292
setfield!(r, 1, missing)
93-
setfield!(r, 3, position(io))
93+
setfield!(r, 3, Int(position(io)))
9494
b = 0x00
9595
code = SUCCESS
9696
eof(io) && (code |= INVALID | EOF; @goto done)

src/strings.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ incr(io::IOBuffer, b) = 1
4444
delims=nothing, openquotechar=nothing, closequotechar=nothing, escapechar=nothing, node=nothing;
4545
kwargs...) where {T <: Union{Tuple{Ptr{UInt8}, Int}, AbstractString}}
4646
# @debug "xparse Sentinel, String: quotechar='$quotechar', delims='$delims'"
47-
setfield!(r, 3, position(io))
47+
setfield!(r, 3, Int(position(io)))
4848
ptr = getptr(io)
4949
len = 0
5050
b = 0x00

0 commit comments

Comments
 (0)