Skip to content

Commit

Permalink
Remove unused takebuf_raw() function
Browse files Browse the repository at this point in the history
  • Loading branch information
nalimilan committed Nov 16, 2016
1 parent 358c441 commit 4b81b0c
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 16 deletions.
6 changes: 0 additions & 6 deletions base/iostream.jl
Original file line number Diff line number Diff line change
Expand Up @@ -221,12 +221,6 @@ read(s::IOStream, ::Type{Char}) = Char(ccall(:jl_getutf8, UInt32, (Ptr{Void},),
take!(s::IOStream) =
ccall(:jl_take_buffer, Vector{UInt8}, (Ptr{Void},), s.ios)

function takebuf_raw(s::IOStream)
sz = position(s)
buf = ccall(:jl_takebuf_raw, Ptr{UInt8}, (Ptr{Void},), s.ios)
return buf, sz
end

function readuntil(s::IOStream, delim::UInt8)
ccall(:jl_readuntil, Array{UInt8,1}, (Ptr{Void}, UInt8), s.ios, delim)
end
Expand Down
1 change: 0 additions & 1 deletion src/julia.h
Original file line number Diff line number Diff line change
Expand Up @@ -1585,7 +1585,6 @@ JL_DLLEXPORT int jl_tcp_bind(uv_tcp_t *handle, uint16_t port, uint32_t host,
JL_DLLEXPORT int jl_sizeof_ios_t(void);

JL_DLLEXPORT jl_array_t *jl_take_buffer(ios_t *s);
JL_DLLEXPORT void *jl_takebuf_raw(ios_t *s);
JL_DLLEXPORT jl_value_t *jl_readuntil(ios_t *s, uint8_t delim);

typedef struct {
Expand Down
9 changes: 0 additions & 9 deletions src/sys.c
Original file line number Diff line number Diff line change
Expand Up @@ -250,15 +250,6 @@ JL_DLLEXPORT jl_array_t *jl_take_buffer(ios_t *s)
return a;
}

// the returned buffer must be manually freed. To determine the size,
// call position(s) before using this function.
JL_DLLEXPORT void *jl_takebuf_raw(ios_t *s)
{
size_t sz;
void *buf = ios_takebuf(s, &sz);
return buf;
}

JL_DLLEXPORT jl_value_t *jl_readuntil(ios_t *s, uint8_t delim)
{
jl_array_t *a;
Expand Down

0 comments on commit 4b81b0c

Please sign in to comment.