diff options
author | Thiago de Arruda <tpadilha84@gmail.com> | 2014-10-17 09:17:12 -0300 |
---|---|---|
committer | Thiago de Arruda <tpadilha84@gmail.com> | 2014-10-18 08:42:49 -0300 |
commit | 68de5d79a243fecc9ef256d9d0356f8541aa3821 (patch) | |
tree | 41250bef42d81344a36d6056f211d761be6e876d /src/nvim/os/job.c | |
parent | 56ef9e86688e79dc6a6bffe73c505eaaddf3be2d (diff) | |
download | rneovim-68de5d79a243fecc9ef256d9d0356f8541aa3821.tar.gz rneovim-68de5d79a243fecc9ef256d9d0356f8541aa3821.tar.bz2 rneovim-68de5d79a243fecc9ef256d9d0356f8541aa3821.zip |
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.
Diffstat (limited to 'src/nvim/os/job.c')
-rw-r--r-- | src/nvim/os/job.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/nvim/os/job.c b/src/nvim/os/job.c index 9fb2a49e50..2ca1023290 100644 --- a/src/nvim/os/job.c +++ b/src/nvim/os/job.c @@ -213,8 +213,14 @@ Job *job_start(char **argv, job->in = wstream_new(maxmem); wstream_set_stream(job->in, (uv_stream_t *)&job->proc_stdin); // Start the readable streams - job->out = rstream_new(read_cb, JOB_BUFFER_SIZE, job, job_event_source(job)); - job->err = rstream_new(read_cb, JOB_BUFFER_SIZE, job, job_event_source(job)); + job->out = rstream_new(read_cb, + rbuffer_new(JOB_BUFFER_SIZE), + job, + job_event_source(job)); + job->err = rstream_new(read_cb, + rbuffer_new(JOB_BUFFER_SIZE), + job, + job_event_source(job)); rstream_set_stream(job->out, (uv_stream_t *)&job->proc_stdout); rstream_set_stream(job->err, (uv_stream_t *)&job->proc_stderr); rstream_start(job->out); |