Skip to content

Commit

Permalink
More adjustments for IO refactoring
Browse files Browse the repository at this point in the history
  • Loading branch information
ihnorton committed Jan 31, 2016
1 parent 11a62d0 commit 58693a0
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/gen_constants.jl
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ r=r"#define (\w+)\s+(-?(0x)?[\dA-F]+)"
c = Dict{ASCIIString, Cint}()

for header in headers
s=readall(joinpath(include_dir, header))
s=readstring(joinpath(include_dir, header))
for m in eachmatch(r, s)
c[m.captures[1]] = parse(Cint, m.captures[2])
end
Expand Down
4 changes: 2 additions & 2 deletions src/x509_crt.jl
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@ function crt_parse!(chain, buf::ByteString)
chain
end

crt_parse!(chain, buf::IOStream) = crt_parse!(chain, readall(buf))
crt_parse!(chain, buf::IOStream) = crt_parse!(chain, readstring(buf))

crt_parse_file(path) = crt_parse(readall(path))
crt_parse_file(path) = crt_parse(readstring(path))

function crt_parse(buf)
crt = CRT()
Expand Down
2 changes: 1 addition & 1 deletion test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,6 @@ let
MbedTLS.handshake(ctx)

write(ctx, "GET / HTTP/1.1\r\nHost: $testhost\r\n\r\n")
buf = bytestring(readbytes(ctx, 100))
buf = bytestring(read(ctx, 100))
@test ismatch(r"^HTTP/1.1 200 OK", buf)
end

0 comments on commit 58693a0

Please sign in to comment.