diff options
Diffstat (limited to 'ext/kgio/tryopen.c')
-rw-r--r-- | ext/kgio/tryopen.c | 32 |
1 files changed, 1 insertions, 31 deletions
diff --git a/ext/kgio/tryopen.c b/ext/kgio/tryopen.c index d87cb17..87017a5 100644 --- a/ext/kgio/tryopen.c +++ b/ext/kgio/tryopen.c @@ -1,10 +1,6 @@ /* We do not modify RSTRING in this file, so RSTRING_MODIFIED is not needed */ #include <ruby.h> -#ifdef HAVE_RUBY_IO_H -# include <ruby/io.h> -#else -# include <rubyio.h> -#endif +#include <ruby/io.h> #ifdef HAVE_RUBY_ST_H # include <ruby/st.h> @@ -17,7 +13,6 @@ #include <fcntl.h> #include <errno.h> #include "set_file_path.h" -#include "ancient_ruby.h" #include "kgio.h" static ID id_for_fd, id_to_path, id_path; @@ -41,27 +36,6 @@ static void * nogvl_open(void *ptr) return (void *)fd; } -#ifndef KGIO_WITHOUT_GVL -# define RUBY_UBF_IO ((void *)(-1)) -# include "rubysig.h" -typedef void my_unblock_function_t(void *); -typedef void *my_blocking_function_t(void *); -static void * my_thread_blocking_region( - my_blocking_function_t *fn, void *data1, - my_unblock_function_t *ubf, void *data2) -{ - void *rv; - - TRAP_BEG; /* for FIFO */ - rv = fn(data1); - TRAP_END; - - return rv; -} -#define KGIO_WITHOUT_GVL(fn,data1,ubf,data2) \ - my_thread_blocking_region((fn),(data1),(ubf),(data2)) -#endif /* ! KGIO_WITHOUT_GVL */ - /* * call-seq: * @@ -157,10 +131,6 @@ void init_kgio_tryopen(void) rb_define_singleton_method(cFile, "tryopen", s_tryopen, -1); rb_include_module(cFile, mPipeMethods); - if (!rb_funcall(cFile, rb_intern("method_defined?"), 1, - ID2SYM(id_to_path))) - rb_define_alias(cFile, "to_path", "path"); - errno2sym = st_init_numtable(); tmp = rb_funcall(rb_mErrno, rb_intern("constants"), 0); len = RARRAY_LEN(tmp); |