Compose.jl
Compose.jl copied to clipboard
PangoAttr troubles on 32-bit platforms
PangoAttr
type is defined with Int
but other functions try to assign Int64
. On a 32-bit machine, this causes a problem.
$ ./julia
_
_ _ _(_)_ | A fresh approach to technical computing
(_) | (_) (_) | Documentation: http://docs.julialang.org
_ _ _| |_ __ _ | Type "help()" to list help topics
| | | | | | |/ _` | |
| | |_| | | | (_| | | Version 0.3.0-prerelease+3456 (2014-06-03 22:37 UTC)
_/ |\__'_|_|_|\__'_| | Commit dc53d93* (0 days old master)
|__/ | i686-redhat-linux
julia> versioninfo()
Julia Version 0.3.0-prerelease+3456
Commit dc53d93* (2014-06-03 22:37 UTC)
Platform Info:
System: Linux (i686-redhat-linux)
CPU: Genuine Intel(R) CPU T2250 @ 1.73GHz
WORD_SIZE: 32
BLAS: libopenblas (DYNAMIC_ARCH NO_AFFINITY)
LAPACK: libopenblas
LIBM: libopenlibm
julia> Pkg.installed("Compose")
v"0.1.29"
julia> using Compose
julia> a = Compose.PangoAttr()
PangoAttr(nothing,nothing,nothing,nothing)
julia> Compose.update_pango_attr(a,:PANGO_ATTR_RISE,3)
ERROR: no method convert(Type{Union(Int32,Nothing)}, Int64)
in update_pango_attr at /home/rick/.julia/v0.3/Compose/src/pango.jl:202
The issues may be here:
From src/pango.jl
.
# A Julia manifestation of a set of pango attributes
type PangoAttr
rise::Maybe(Int)
scale::Maybe(Float64)
style::Maybe(Int)
weight::Maybe(Int)
function PangoAttr()
new(nothing, nothing, nothing, nothing)
end
end
and then further down ...
function update_pango_attr(attr::PangoAttr, attr_name::Symbol, value)
if attr_name == :PANGO_ATTR_RISE
attr.rise = int64(value)
elseif attr_name == :PANGO_ATTR_SCALE
attr.scale = value
elseif attr_name == :PANGO_ATTR_STYLE
attr.style = int64(value)
elseif attr_name == :PANGO_ATTR_WEIGHT
attr.weight = int64(value)
end
attr
end