Skip to content

Commit

Permalink
Merge pull request #286 from dcjones/master
Browse files Browse the repository at this point in the history
Fix an error from memio deprecation.
  • Loading branch information
johnmyleswhite committed Jun 19, 2013
2 parents 3b80210 + 0691a69 commit 93e8d1d
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/io.jl
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,13 @@ end
##############################################################################

function make_extract_string()
# extract_cache = memio(500, false)
extract_cache = memio(500, false)
extract_cache = IOBuffer(Array(Uint8, 500), true, true)
# Do we really need a closure?
# Why not just keep passing this argument in?
function f(this, left::Int, right::Int, omitlist::Set = Set())
extract_cache_size = right - left
if extract_cache_size > length(extract_cache.ios)
extract_cache = memio(extract_cache_size, false)
if extract_cache_size > extract_cache.size
extract_cache = IOBuffer(Array(Uint8, extract_cache_size), true, true)
end
seek(extract_cache, 0) # necessary?
if length(this) >= 1
Expand Down

0 comments on commit 93e8d1d

Please sign in to comment.