JuliaGraphics / Winston.jl

2D plotting for Julia
MIT License
171 stars 55 forks source link

Change Int32 to Int #287

Closed tknopp closed 6 years ago

tknopp commented 6 years ago

Its not clear to me why these are Int64. Within grisu there is a case where it is expected to be Int and then it crashes. @nolta was there a specific reason for Int32?

tknopp commented 6 years ago

maybe. The bug that I encounter is

ERROR: MethodError: no method matching bignumdtoa(::Float64, ::Int64, ::Int32, ::Array{UInt8,1}, ::Array{Base.Grisu.Bignums.Bignum,1})
Closest candidates are:
  bignumdtoa(::Any, ::Any, ::Int64, ::Any, ::Any) at grisu/bignum.jl:41
Stacktrace:
 [1] grisu(::Float64, ::Int64, ::Int32, ::Array{UInt8,1}, ::Array{Base.Grisu.Bignums.Bignum,1}) at ./grisu/grisu.jl:51
 [2] grisu(::Float64, ::Int64, ::Int32) at /Users/knopp/.julia/v0.6/Winston/src/Winston.jl:435
 [3] #_format_ticklabel#48(::Int64, ::Function, ::Float64, ::Float64) at /Users/knopp/.julia/v0.6/Winston/src/Winston.jl:441

And in bignumdtoa the third argument is constraint to be an Int, which is what we passed in Winston as Int32.

tknopp commented 6 years ago

@ararslan: I don't have write access so merging (and making a bugfix release) is up to you. Or you give me the power.

tknopp commented 6 years ago

thanks a lot!