Skip to content

Commit d30435d

Browse files
authored
Merge pull request #23 from JuliaArchive/yyc/0.7
Fix most of depwarn on 0.7
2 parents 111de11 + 7ae6657 commit d30435d

File tree

6 files changed

+11
-4
lines changed

6 files changed

+11
-4
lines changed

.travis.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ os:
66
julia:
77
- 0.4
88
- 0.5
9+
- 0.6
910
- nightly
1011
notifications:
1112
email: false

appveyor.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ environment:
44
- JULIA_URL: "https://julialang-s3.julialang.org/bin/winnt/x64/0.4/julia-0.4-latest-win64.exe"
55
- JULIA_URL: "https://julialang-s3.julialang.org/bin/winnt/x86/0.5/julia-0.5-latest-win32.exe"
66
- JULIA_URL: "https://julialang-s3.julialang.org/bin/winnt/x64/0.5/julia-0.5-latest-win64.exe"
7+
- JULIA_URL: "https://julialang-s3.julialang.org/bin/winnt/x86/0.6/julia-0.6-latest-win32.exe"
8+
- JULIA_URL: "https://julialang-s3.julialang.org/bin/winnt/x64/0.6/julia-0.6-latest-win64.exe"
79
- JULIA_URL: "https://julialangnightlies-s3.julialang.org/bin/winnt/x86/julia-latest-win32.exe"
810
- JULIA_URL: "https://julialangnightlies-s3.julialang.org/bin/winnt/x64/julia-latest-win64.exe"
911

src/LegacyStrings.jl

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,11 +50,15 @@ using Compat
5050

5151
if VERSION >= v"0.5.0-"
5252
immutable ASCIIString <: DirectIndexString
53-
data::Array{UInt8,1}
53+
data::Vector{UInt8}
54+
ASCIIString(data::String) = new(Vector{UInt8}(data))
55+
ASCIIString(data) = new(data)
5456
end
5557

5658
immutable UTF8String <: AbstractString
5759
data::Vector{UInt8}
60+
UTF8String(data::String) = new(Vector{UInt8}(data))
61+
UTF8String(data) = new(data)
5862
end
5963

6064
immutable UTF16String <: AbstractString

src/utf16.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -311,4 +311,4 @@ Create a string from the address of a NUL-terminated UTF-16 string. A copy is ma
311311
pointer can be safely freed. If `length` is specified, the string does not have to be
312312
NUL-terminated.
313313
"""
314-
utf16(::Union{Ptr{UInt16},Ptr{Int16}}, length=?)
314+
utf16(::Union{Ptr{UInt16},Ptr{Int16}}, length=length)

src/utf32.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -276,4 +276,4 @@ Create a string from the address of a NUL-terminated UTF-32 string. A copy is ma
276276
pointer can be safely freed. If `length` is specified, the string does not have to be
277277
NUL-terminated.
278278
"""
279-
utf32(::Union{Ptr{Char},Ptr{UInt32},Ptr{Int32}}, length=?)
279+
utf32(::Union{Ptr{Char},Ptr{UInt32},Ptr{Int32}}, length=length)

test/runtests.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -440,7 +440,7 @@ for (fun, S, T) in ((utf16, UInt16, UTF16String), (utf32, UInt32, UTF32String))
440440
cmpx = (S == UInt16 ? cmp16 : cmp32)
441441
@test typeof(tst) == SubString{T}
442442
@test convert(T, tst) == str[4:end]
443-
@test convert(Vector{Char}, x) == cmp
443+
@test Vector{Char}(x) == cmp
444444
# Vector{T} / Array{T}
445445
@test convert(Vector{S}, x) == cmpx
446446
@test convert(Array{S}, x) == cmpx

0 commit comments

Comments
 (0)