summaryrefslogtreecommitdiff
path: root/ext/-test-/thread_fd_close/thread_fd_close.c
diff options
context:
space:
mode:
Diffstat (limited to 'ext/-test-/thread_fd_close/thread_fd_close.c')
-rw-r--r--ext/-test-/thread_fd_close/thread_fd_close.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/ext/-test-/thread_fd_close/thread_fd_close.c b/ext/-test-/thread_fd_close/thread_fd_close.c
new file mode 100644
index 0000000..4fd967c
--- /dev/null
+++ b/ext/-test-/thread_fd_close/thread_fd_close.c
@@ -0,0 +1,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_close(void)
+{
+ rb_define_singleton_method(rb_cIO, "thread_fd_close", thread_fd_close, 1);
+}