diff --git a/base/iostream.jl b/base/iostream.jl index 0ab86c1005d1d2..35c92a6263d27c 100644 --- a/base/iostream.jl +++ b/base/iostream.jl @@ -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 diff --git a/src/julia.h b/src/julia.h index 29146e1456668b..a6222b9a58c3d0 100644 --- a/src/julia.h +++ b/src/julia.h @@ -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 { diff --git a/src/sys.c b/src/sys.c index c2c23803ac71c0..b93c2dc500dbb8 100644 --- a/src/sys.c +++ b/src/sys.c @@ -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;