mirror of
https://github.com/neovim/neovim.git
synced 2025-09-15 07:48:18 +00:00
rstream: Extract some RStream functionality to RBuffer
RBuffer instances represent the internal buffer used by RStreams. This changes RStream constructor to receive RBuffer pointers and adds a set of RBuffer methods that expose the lower level buffer manipulation to consumers of the RStream API.
This commit is contained in:
@@ -341,7 +341,7 @@ static void system_data_cb(RStream *rstream, void *data, bool eof)
|
||||
Job *job = data;
|
||||
dyn_buffer_t *buf = job_data(job);
|
||||
|
||||
size_t nread = rstream_available(rstream);
|
||||
size_t nread = rstream_pending(rstream);
|
||||
|
||||
dyn_buf_ensure(buf, buf->len + nread + 1);
|
||||
rstream_read(rstream, buf->data + buf->len, nread);
|
||||
|
Reference in New Issue
Block a user