Skip to content

Commit

Permalink
Fix for Base Unicode functions moving to stdlib (#229)
Browse files Browse the repository at this point in the history
  • Loading branch information
ararslan authored Dec 14, 2017
1 parent 600a40b commit 6ef716a
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 1 deletion.
5 changes: 5 additions & 0 deletions src/Common.jl
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@ Internal implementation detail.
"""
module Common

using Compat
if VERSION >= v"0.7.0-DEV.2915"
using Unicode
end

include("bytes.jl")
include("errors.jl")

Expand Down
4 changes: 4 additions & 0 deletions src/Writer.jl
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ using ..Common
using ..Serializations: Serialization, StandardSerialization,
CommonSerialization

if VERSION >= v"0.7.0-DEV.2915"
using Unicode
end

"""
Internal JSON.jl implementation detail; do not depend on this type.
Expand Down
2 changes: 1 addition & 1 deletion src/bytes.jl
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ const ESCAPES = Dict(
LATIN_T => TAB)

const REVERSE_ESCAPES = Dict(reverse(p) for p in ESCAPES)
const ESCAPED_ARRAY = Vector{Vector{UInt8}}(256)
const ESCAPED_ARRAY = Vector{Vector{UInt8}}(uninitialized, 256)
for c in 0x00:0xFF
ESCAPED_ARRAY[c + 1] = if c == SOLIDUS
[SOLIDUS] # don't escape this one
Expand Down

0 comments on commit 6ef716a

Please sign in to comment.