Skip to content

Commit

Permalink
correct fix for JuliaLang#5653
Browse files Browse the repository at this point in the history
  • Loading branch information
JeffBezanson committed Feb 11, 2014
1 parent b4cc27b commit 4b37277
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion base/io.jl
Original file line number Diff line number Diff line change
Expand Up @@ -486,7 +486,7 @@ function readbytes!(s::IOStream, b::Array{Uint8}, nb=length(b))
end
nr += int(ccall(:ios_readall, Uint,
(Ptr{Void}, Ptr{Void}, Uint),
s.ios, pointer(b, nr+1), nb - nr))
s.ios, pointer(b, nr+1), min(lb-nr, nb-nr)))
end
if lb > olb
resize!(b, nr) # shrink to just contain input data if was resized
Expand Down
1 change: 1 addition & 0 deletions src/cgutils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -594,6 +594,7 @@ static jl_value_t *julia_type_of_without_metadata(Value *v, bool err=true)
static jl_value_t *julia_type_of(Value *v)
{
MDNode *mdn;
assert(v != NULL);
if (dyn_cast<Instruction>(v) == NULL ||
(mdn = ((Instruction*)v)->getMetadata("julia_type")) == NULL) {
return julia_type_of_without_metadata(v, true);
Expand Down

0 comments on commit 4b37277

Please sign in to comment.