From 991d3ec1e679bb6407f2a5820910d2968424183c Mon Sep 17 00:00:00 2001 From: Thiago de Arruda Date: Thu, 16 Jul 2015 23:10:04 -0300 Subject: event loop: New abstraction layer with refactored time/signal API - Add event loop abstraction module under src/nvim/event. The src/nvim/event/loop module replaces src/nvim/os/event - Remove direct dependency on libuv signal/timer API and use the new abstraction instead. - Replace all references to uv_default_loop() by &loop.uv, a new global variable that wraps libuv main event loop but allows the event loop functions to be reused in other contexts. --- src/nvim/os/wstream.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/nvim/os/wstream.c') diff --git a/src/nvim/os/wstream.c b/src/nvim/os/wstream.c index 73896c381d..7f5191947a 100644 --- a/src/nvim/os/wstream.c +++ b/src/nvim/os/wstream.c @@ -103,7 +103,7 @@ void wstream_set_file(WStream *wstream, uv_file file) assert(uv_guess_handle(file) == UV_NAMED_PIPE || uv_guess_handle(file) == UV_TTY); wstream->stream = xmalloc(sizeof(uv_pipe_t)); - uv_pipe_init(uv_default_loop(), (uv_pipe_t *)wstream->stream, 0); + uv_pipe_init(&loop.uv, (uv_pipe_t *)wstream->stream, 0); uv_pipe_open((uv_pipe_t *)wstream->stream, file); wstream->stream->data = NULL; handle_set_wstream((uv_handle_t *)wstream->stream, wstream); -- cgit