aboutsummaryrefslogtreecommitdiffstats
path: root/ext/-test-/thread_fd/thread_fd.c
blob: 3d3ec8a2e065758cd6168f2fea540eba7d6bcf8b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#include "ruby/ruby.h"

static VALUE
thread_fd_close(VALUE ign, VALUE fd)
{
    rb_thread_fd_close(NUM2INT(fd));
    return Qnil;
}

void
Init_thread_fd(void)
{
    rb_define_singleton_method(rb_cIO, "thread_fd_close", thread_fd_close, 1);
}