From 15d7748bf8eeb5e7a40c618d9be86597512fa296 Mon Sep 17 00:00:00 2001 From: Robert Feldt Date: Mon, 28 Dec 2015 11:28:54 +0100 Subject: [PATCH] update for Julia 0.4 --- src/SuffixArrays.jl | 4 ++-- src/sais.jl | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/SuffixArrays.jl b/src/SuffixArrays.jl index f878d1e..4fd51ce 100644 --- a/src/SuffixArrays.jl +++ b/src/SuffixArrays.jl @@ -2,7 +2,7 @@ module SuffixArrays export suffixsort -immutable SuffixArray{S<:String,N<:Signed} +immutable SuffixArray{S<:AbstractString,N<:Signed} string::S n::Int index::Array{N,1} @@ -30,7 +30,7 @@ end #=contains(haystack, needle) matchall(substring, s::String)=# -const MAXCHAR = char(255) +const MAXCHAR = Char(255) function lcp2(SA,s) inv = similar(SA) diff --git a/src/sais.jl b/src/sais.jl index 05a20a4..f7860d5 100644 --- a/src/sais.jl +++ b/src/sais.jl @@ -29,6 +29,7 @@ type IntArray a::Array{Int,1} pos::Int end +import Base: getindex, setindex! getindex(a::IntArray,key) = a.a[a.pos + key] setindex!(a::IntArray,value,key) = a.a[a.pos + key] = value