~neovim-ppa/neovim-ppa/neovim-deps

« back to all changes in this revision

Viewing changes to src/luv/src/fs_poll.c

  • Committer: marvim
  • Date: 2019-06-30 20:03:32 UTC
  • Revision ID: git-v1:18ec389a6acbc29364a286570407be6bf0f7b3e3
deps src: Automatic update

Show diffs side-by-side

added added

removed removed

Lines of Context:
24
24
}
25
25
 
26
26
static int luv_new_fs_poll(lua_State* L) {
 
27
  luv_ctx_t* ctx = luv_context(L);
27
28
  uv_fs_poll_t* handle = (uv_fs_poll_t*)luv_newuserdata(L, sizeof(*handle));
28
 
  int ret = uv_fs_poll_init(luv_loop(L), handle);
 
29
  int ret = uv_fs_poll_init(ctx->loop, handle);
29
30
  if (ret < 0) {
30
31
    lua_pop(L, 1);
31
32
    return luv_error(L, ret);
32
33
  }
33
 
  handle->data = luv_setup_handle(L);
 
34
  handle->data = luv_setup_handle(L, ctx);
34
35
  return 1;
35
36
}
36
37
 
37
38
static void luv_fs_poll_cb(uv_fs_poll_t* handle, int status, const uv_stat_t* prev, const uv_stat_t* curr) {
38
39
  luv_handle_t* data = (luv_handle_t*)handle->data;
39
 
  lua_State* L = data->L;
 
40
  lua_State* L = data->ctx->L;
40
41
 
41
42
  // err
42
43
  luv_status(L, status);