Skip to content

Instantly share code, notes, and snippets.

@ul
Last active April 9, 2019 10:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ul/6e4e4383143aca039cab204c9f81a961 to your computer and use it in GitHub Desktop.
Save ul/6e4e4383143aca039cab204c9f81a961 to your computer and use it in GitHub Desktop.
libuv translate-c
pub const struct_uv_handle_s = extern struct {
data: ?*c_void,
loop: [*c]uv_loop_t,
type: uv_handle_type,
close_cb: uv_close_cb, // line 1736
handle_queue: [2](?*c_void),
u: extern union {
fd: c_int,
reserved: [4](?*c_void),
},
next_closing: [*c]uv_handle_t,
flags: c_uint,
};
pub const uv_handle_t = struct_uv_handle_s;
pub const uv_close_cb = ?extern fn([*c]uv_handle_t) void;
pub const uv_async_cb = ?extern fn([*c]uv_async_t) void;
pub const struct_uv_async_s = extern struct {
data: ?*c_void,
loop: [*c]uv_loop_t,
type: uv_handle_type,
close_cb: uv_close_cb, // line 1752
handle_queue: [2](?*c_void),
u: extern union {
fd: c_int,
reserved: [4](?*c_void),
},
next_closing: [*c]uv_handle_t,
flags: c_uint,
async_cb: uv_async_cb,
queue: [2](?*c_void),
pending: c_int,
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment