Skip to content

Instantly share code, notes, and snippets.

@avalanche123
Created April 3, 2012 21:59
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 avalanche123/cf226e89038edc688112 to your computer and use it in GitHub Desktop.
Save avalanche123/cf226e89038edc688112 to your computer and use it in GitHub Desktop.
UV_EXTERN size_t uv_handle_size (uv_handle_type handle)
{
switch (handle) {
case UV_NAMED_PIPE:
return sizeof(uv_pipe_t);
case UV_TTY:
return sizeof(uv_tty_t);
case UV_TCP:
return sizeof(uv_tcp_t);
case UV_UDP:
return sizeof(uv_udp_t);
case UV_PREPARE:
return sizeof(uv_prepare_t);
case UV_CHECK:
return sizeof(uv_check_t);
case UV_IDLE:
return sizeof(uv_idle_t);
case UV_ASYNC:
return sizeof(uv_async_t);
case UV_TIMER:
return sizeof(uv_timer_t);
case UV_PROCESS:
return sizeof(uv_process_t);
case UV_FS_EVENT:
return sizeof(uv_fs_event_t);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment