Skip to content

Commit df72dc6

Browse files
committed
removed depwarn
1 parent 9c2c1b5 commit df72dc6

File tree

2 files changed

+11
-10
lines changed

2 files changed

+11
-10
lines changed

src/query.jl

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,11 @@ immutable SAVE end
1111
split_predicates(list) = filter(x-> x <: OS, list), filter(x-> !(x <: OS), list)
1212
applies_to_os(os::Vector) = isempty(os) || any(applies_to_os, os)
1313
applies_to_os{O <: OS}(os::Type{O}) = false
14-
@unix_only applies_to_os{U <: Unix}(os::Type{U}) = true
15-
@windows_only applies_to_os(os::Type{Windows}) = true
16-
@linux_only applies_to_os(os::Type{OSX}) = false
17-
@osx_only applies_to_os(os::Type{Linux}) = false
14+
15+
applies_to_os{U <: Unix}(os::Type{U}) = is_unix()
16+
applies_to_os(os::Type{Windows}) = is_windows()
17+
applies_to_os(os::Type{OSX}) = is_apple()
18+
applies_to_os(os::Type{Linux}) = is_linux()
1819

1920
function add_loadsave(format, predicates)
2021
library = shift!(predicates)
@@ -240,7 +241,7 @@ immutable Stream{F<:DataFormat,IOtype<:IO} <: Formatted{F}
240241
end
241242

242243
Stream{F<:DataFormat}(::Type{F}, io::IO) = Stream{F,typeof(io)}(io, Nullable{Compat.UTF8String}())
243-
Stream{F<:DataFormat}(::Type{F}, io::IO, filename::AbstractString) = Stream{F,typeof(io)}(io,utf8(filename))
244+
Stream{F<:DataFormat}(::Type{F}, io::IO, filename::AbstractString) = Stream{F,typeof(io)}(io,Compat.String(filename))
244245
Stream{F<:DataFormat}(::Type{F}, io::IO, filename) = Stream{F,typeof(io)}(io,filename)
245246
Stream{F}(file::File{F}, io::IO) = Stream{F,typeof(io)}(io,filename(file))
246247

@@ -383,7 +384,7 @@ hasfunction(s::Tuple) = false #has magic
383384
@doc """
384385
`query(io, [filename])` returns a `Stream` object with information about the
385386
format inferred from the magic bytes.""" ->
386-
query(io::IO, filename) = query(io, Nullable(utf8(filename)))
387+
query(io::IO, filename) = query(io, Nullable(Compat.String(filename)))
387388

388389
function query(io::IO, filename::Nullable{Compat.UTF8String}=Nullable{Compat.UTF8String}())
389390
magic = Array(UInt8, 0)

src/registry.jl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -117,12 +117,12 @@ add_format(format"FLAC","fLaC",".flac",[:FLAC])
117117
# AVI is a subtype of RIFF, as is WAV
118118
function detectavi(io)
119119
seekstart(io)
120-
magic = ascii(read(io, UInt8, 4))
121-
magic == "RIFF" || return false
120+
magic = read(io, UInt8, 4)
121+
magic == b"RIFF" || return false
122122
seek(io, 8)
123-
submagic = ascii(read(io, UInt8, 4))
123+
submagic = read(io, UInt8, 4)
124124

125-
submagic == "AVI "
125+
submagic == b"AVI "
126126
end
127127
add_format(format"AVI", detectavi, ".avi", [:ImageMagick])
128128

0 commit comments

Comments
 (0)