This definitely helps:
#define FS_CALL(func, cb_index, path, ...)
\
do {
\
uv_err_t err;
\
int argc;
\
if (lua_isfunction(L, cb_index)) {
\
if (uv_fs_##func(luv_get_loop(L), req, __VA_ARGS__, luv_after_fs)) {
\
err = uv_last_error(luv_get_loop(L));
\
luv_push_async_error(L, err, #func, path);
\
uv_fs_req_cleanup(req);
\
* free(req->data);
\*
* return lua_error(L);
\*
}
\
return 0;
\
}
\
if (uv_fs_##func(luv_get_loop(L), req, __VA_ARGS__, NULL) < 0) {
\
err = uv_last_error(luv_get_loop(L));
\
luv_push_async_error(L, err, #func, path);
\
uv_fs_req_cleanup(req);
\
* free(req->data);
\*
* return lua_error(L);
\*
}
\
argc = luv_process_fs_result(L, req); \
lua_remove(L, -argc - 1);
\
* uv_fs_req_cleanup(req);
\*
* free(req->data);
\*
return argc;
\
} while (0)
--
You received this message because you are subscribed to the Google Groups
"luvit" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.
