Skip to content

Commit

Permalink
Drop 0.4 and update a few deprecated syntax (#82)
Browse files Browse the repository at this point in the history
Drop 0.4 and update deprecated syntax
  • Loading branch information
musm authored Jul 30, 2017
1 parent 1b2f3a2 commit 813266d
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 11 deletions.
1 change: 0 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ os:
- osx
- linux
julia:
- 0.4
- 0.5
- 0.6
- nightly
Expand Down
4 changes: 2 additions & 2 deletions REQUIRE
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
julia 0.4
Compat 0.9.5
julia 0.5
Compat 0.27.0
2 changes: 0 additions & 2 deletions appveyor.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
environment:
matrix:
- JULIA_URL: "https://julialang-s3.julialang.org/bin/winnt/x86/0.4/julia-0.4-latest-win32.exe"
- JULIA_URL: "https://julialang-s3.julialang.org/bin/winnt/x64/0.4/julia-0.4-latest-win64.exe"
- JULIA_URL: "https://julialang-s3.julialang.org/bin/winnt/x86/0.5/julia-0.5-latest-win32.exe"
- JULIA_URL: "https://julialang-s3.julialang.org/bin/winnt/x64/0.5/julia-0.5-latest-win64.exe"
- JULIA_URL: "https://julialang-s3.julialang.org/bin/winnt/x86/0.6/julia-0.6-latest-win32.exe"
Expand Down
5 changes: 2 additions & 3 deletions src/LibExpat.jl
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,12 @@ __precompile__()
module LibExpat

using Compat
using Compat: String, unsafe_string

import Base: getindex, show, parse

if is_windows()
if Compat.Sys.iswindows()
const libexpat = "libexpat-1"
elseif is_unix()
elseif Compat.Sys.isunix()
const libexpat = "libexpat"
end

Expand Down
4 changes: 2 additions & 2 deletions src/xpath.jl
Original file line number Diff line number Diff line change
Expand Up @@ -778,7 +778,7 @@ xpath_boolean(a::AbstractString) = !isempty(a)
xpath_boolean(a::Vector) = !isempty(a)
xpath_boolean(a::ETree) = true

xpath_number(a::Bool) = a?1:0
xpath_number(a::Bool) = a ? 1 : 0
xpath_number(a::Int) = a
xpath_number(a::Float64) = a
xpath_number(a::AbstractString) = try parse(Float64,a) catch ex NaN end
Expand All @@ -791,7 +791,7 @@ function xpath_string(a::Float64)
if a == 0
return "0"
elseif isinf(a)
return (a<0? "-Infinity" : "Infinity")
return (a < 0 ? "-Infinity" : "Infinity")
elseif isinteger(a)
return string(Int(a))
else
Expand Down
2 changes: 1 addition & 1 deletion test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ using LibExpat
using Base.Test
using Compat

const DATADIR = joinpath(dirname(@__FILE__), "data")
const DATADIR = joinpath(@__DIR__, "data")

pd = xp_parse(open(readstring, joinpath(DATADIR,"t_s1.txt")))
@test isa(pd, ETree)
Expand Down

0 comments on commit 813266d

Please sign in to comment.