Sha256: e9a174cd9e413e78e8b941d63a16f45fcf5f808d36c55ed39091b8cfcfad7eb3
Contents?: true
Size: 1002 Bytes
Versions: 3
Compression:
Stored size: 1002 Bytes
Contents
/* * Copyright (C) 2007 Tony Arcieri * You may redistribute this under the terms of the Ruby license. * See LICENSE for details */ #ifndef REV_H #define REV_H #include "ruby.h" #include "rubyio.h" #ifdef GetReadFile #define FPTR_TO_FD(fptr) (fileno(GetReadFile(fptr))) #else #if !HAVE_RB_IO_T || (RUBY_VERSION_MAJOR == 1 && RUBY_VERSION_MINOR == 8) #define FPTR_TO_FD(fptr) fileno(fptr->f) #else #define FPTR_TO_FD(fptr) fptr->fd #endif #endif struct Rev_Event { /* These values are used to extract events from libev callbacks */ VALUE watcher; int revents; }; struct Rev_Loop { struct ev_loop *ev_loop; int running; int events_received; int eventbuf_size; struct Rev_Event *eventbuf; }; struct Rev_Watcher { union { struct ev_io ev_io; struct ev_timer ev_timer; struct ev_stat ev_stat; } event_types; int enabled; VALUE loop; void (*dispatch_callback)(VALUE self, int revents); }; void Rev_Loop_process_event(VALUE watcher, int revents); #endif
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
rev-0.3.2 | ext/rev/rev.h |
rev-0.3.1 | ext/rev/rev.h |
rev-0.3.0 | ext/rev/rev.h |