mirror of
https://github.com/neovim/neovim.git
synced 2025-09-14 23:38:17 +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:
@@ -19531,7 +19531,7 @@ static void on_job_exit(Job *job, void *data)
|
||||
static void on_job_data(RStream *rstream, void *data, bool eof, char *type)
|
||||
{
|
||||
Job *job = data;
|
||||
uint32_t read_count = rstream_available(rstream);
|
||||
uint32_t read_count = rstream_pending(rstream);
|
||||
char *str = xmalloc(read_count + 1);
|
||||
|
||||
rstream_read(rstream, str, read_count);
|
||||
|
Reference in New Issue
Block a user