Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix for Base Unicode functions moving to stdlib #229

Merged
merged 1 commit into from
Dec 14, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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