From 8ab79c1968ca1659d4fb3666824029a39a3873ab Mon Sep 17 00:00:00 2001 From: Milan Bouchet-Valat Date: Mon, 24 Oct 2016 12:10:30 +0200 Subject: [PATCH] Remove unused takebuf_raw() function --- base/iostream.jl | 6 ------ src/julia.h | 1 - src/sys.c | 9 --------- 3 files changed, 16 deletions(-) diff --git a/base/iostream.jl b/base/iostream.jl index b06e21e6d15c44..32121c2fd589f5 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},), takebuf(s::IOStream) = ccall(:jl_takebuf, 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 a67bf74c74628f..01da4e943e940d 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_takebuf(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 754e51c7626435..a54cfdcf4de675 100644 --- a/src/sys.c +++ b/src/sys.c @@ -250,15 +250,6 @@ JL_DLLEXPORT jl_array_t *jl_takebuf(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;