From 57b1004b7fc40c7c2bb4ea64b4261cf6ad013ebc Mon Sep 17 00:00:00 2001 From: hustf Date: Mon, 19 Oct 2015 00:18:28 +0200 Subject: [PATCH 1/2] modified: Issue 246 Winston.jl:97 } ( -> }( plot.jl:572 FloatingPoint ~> AbstractFloat renderer.jl:63 color_to_rgb(s::AbstractString) =parse(Colorant,s) --- src/Winston.jl | 3 +-- src/plot.jl | 2 +- src/renderer.jl | 2 +- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/src/Winston.jl b/src/Winston.jl index 293da38..a5b0ab3 100644 --- a/src/Winston.jl +++ b/src/Winston.jl @@ -10,7 +10,6 @@ end using IniFile using Compat using Dates - isdefined(Base, :Libc) && (strftime = Libc.strftime) isdefined(Base, :Dates) && (datetime2unix = Dates.datetime2unix) @@ -93,7 +92,7 @@ import Base: copy, export get_context, device_to_data, data_to_device if VERSION < v"0.3-" - typealias AbstractVecOrMat{T} (@compat Union{AbstractVector{T}, AbstractMatrix{T}}) + typealias AbstractVecOrMat{T}(@compat Union{AbstractVector{T}, AbstractMatrix{T}}) extrema(x) = (minimum(x),maximum(x)) Base.push!(x, a, b) = (push!(x, a); push!(x, b)) elseif VERSION < v"0.4-" diff --git a/src/plot.jl b/src/plot.jl index d37fdfd..b8de2ab 100644 --- a/src/plot.jl +++ b/src/plot.jl @@ -569,7 +569,7 @@ function fplot(f::Function, limits, args...; kvs...) pargs = [arg] elseif typeof(arg) <: Integer fopts[:min_points] = arg - elseif typeof(arg) <: FloatingPoint +@compat elseif typeof(arg) <: AbstractFloat fopts[:tol] = arg else error("unrecognized argument ", arg) diff --git a/src/renderer.jl b/src/renderer.jl index 6b1ebca..fc3af34 100644 --- a/src/renderer.jl +++ b/src/renderer.jl @@ -60,7 +60,7 @@ end ## state commands color_to_rgb(i::Integer) = convert(RGB, RGB24(unsigned(i))) -color_to_rgb(s::AbstractString) = color(s) +color_to_rgb(s::AbstractString) =parse(Colorant,s) color_to_rgb(rgb::@compat(Tuple{Real,Real,Real})) = RGB(rgb...) color_to_rgb(cv::Color) = convert(RGB, cv) color_to_rgb(cv::TransparentColor) = cv From de375fd052e76e6fc327ff6aac0e0ce7539a3fbd Mon Sep 17 00:00:00 2001 From: slangangular Date: Fri, 23 Oct 2015 15:43:42 +0200 Subject: [PATCH 2/2] fix use of @compat in 57b1004b7fc40c7c2bb4ea64b4261cf6ad013ebc --- src/plot.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plot.jl b/src/plot.jl index b8de2ab..2fb32b8 100644 --- a/src/plot.jl +++ b/src/plot.jl @@ -569,7 +569,7 @@ function fplot(f::Function, limits, args...; kvs...) pargs = [arg] elseif typeof(arg) <: Integer fopts[:min_points] = arg -@compat elseif typeof(arg) <: AbstractFloat + elseif typeof(arg) <: @compat AbstractFloat fopts[:tol] = arg else error("unrecognized argument ", arg)