diff options
author | Thiago de Arruda <tpadilha84@gmail.com> | 2014-06-17 10:01:51 -0300 |
---|---|---|
committer | Thiago de Arruda <tpadilha84@gmail.com> | 2014-06-18 11:36:07 -0300 |
commit | 1843f0c2c60b0f4c6886141c1d504ab444d90dce (patch) | |
tree | 995f7ede720aa7a38b794dd16fb2ed07f772a731 /src | |
parent | ac5fb407e43814477102cea1885adc225742571c (diff) | |
download | rneovim-1843f0c2c60b0f4c6886141c1d504ab444d90dce.tar.gz rneovim-1843f0c2c60b0f4c6886141c1d504ab444d90dce.tar.bz2 rneovim-1843f0c2c60b0f4c6886141c1d504ab444d90dce.zip |
rstream: Rename RStream `async` flag to `defer`
The name `async` was not appropriate to describe the behavior enabled by the
flag.
Diffstat (limited to 'src')
-rw-r--r-- | src/nvim/os/rstream.c | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/src/nvim/os/rstream.c b/src/nvim/os/rstream.c index 1025201f7a..c3e0dea098 100644 --- a/src/nvim/os/rstream.c +++ b/src/nvim/os/rstream.c @@ -24,7 +24,7 @@ struct rstream { uv_file fd; rstream_cb cb; size_t buffer_size, rpos, wpos, fpos; - bool reading, free_handle, async; + bool reading, free_handle, defer; }; #ifdef INCLUDE_GENERATED_DECLARATIONS @@ -38,21 +38,19 @@ struct rstream { /// for reading with `rstream_read` /// @param buffer_size Size in bytes of the internal buffer. /// @param data Some state to associate with the `RStream` instance -/// @param async Flag that specifies if the callback should only be called -/// outside libuv event loop(When processing async events with -/// KE_EVENT). Only the RStream instance reading user input should set -/// this to false +/// @param defer Flag that specifies if callback invocation should be deferred +/// to vim main loop(as a KE_EVENT special key) /// @return The newly-allocated `RStream` instance RStream * rstream_new(rstream_cb cb, size_t buffer_size, void *data, - bool async) + bool defer) { RStream *rv = xmalloc(sizeof(RStream)); rv->buffer = xmalloc(buffer_size); rv->buffer_size = buffer_size; rv->data = data; - rv->async = async; + rv->defer = defer; rv->cb = cb; rv->rpos = rv->wpos = rv->fpos = 0; rv->stream = NULL; @@ -333,7 +331,7 @@ static void close_cb(uv_handle_t *handle) static void emit_read_event(RStream *rstream, bool eof) { - if (rstream->async) { + if (rstream->defer) { Event event; event.type = kEventRStreamData; |