kgio.git about / heads / tags kinder, gentler I/O for Ruby
blob cfec302cca199b3f02db9b0981a9105e6193252b 289 bytes (raw) $ git show HEAD:ext/kgio/sock_for_fd.h # shows this blob on the CLI
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
#ifndef SOCK_FOR_FD_H #define SOCK_FOR_FD_H #include <ruby.h> static ID id_for_fd; static VALUE sock_for_fd(VALUE klass, int fd) { return rb_funcall(klass, id_for_fd, 1, INT2NUM(fd)); } static void init_sock_for_fd(void) { id_for_fd = rb_intern("for_fd"); } #endif /* SOCK_FOR_FD_H */
git clone git://yhbt.net/kgio.git git clone https://yhbt.net/kgio.git