diff options
author | Eric Wong <bofh@yhbt.net> | 2023-09-10 18:49:48 +0000 |
---|---|---|
committer | Eric Wong <bofh@yhbt.net> | 2023-09-10 20:11:23 +0000 |
commit | cb4eac178dcabcc08d7f6808983286b5e32af3fa (patch) | |
tree | c9e21d1d5fcc1d03358e24692f1a6ec58c168518 /ext/kgio/set_file_path.h | |
parent | 12e7f65ab9b6a14b3d59094f4d305b3150e0e7b7 (diff) | |
download | kgio-cb4eac178dcabcc08d7f6808983286b5e32af3fa.tar.gz |
Ruby 1.8 is long gone, and rb_io_t internals are going private so we can't assign fptr->pathv and such, so rely on ivars for that. TCP autopush never seemed worth it, but the ivar fallback remains in case anybody wants to use it.
Diffstat (limited to 'ext/kgio/set_file_path.h')
-rw-r--r-- | ext/kgio/set_file_path.h | 22 |
1 files changed, 0 insertions, 22 deletions
diff --git a/ext/kgio/set_file_path.h b/ext/kgio/set_file_path.h index 46603f1..756d9bb 100644 --- a/ext/kgio/set_file_path.h +++ b/ext/kgio/set_file_path.h @@ -1,27 +1,5 @@ /* We do not modify RSTRING in this file, so RSTRING_MODIFIED is not needed */ -#if defined(HAVE_RB_IO_T) && \ - defined(HAVE_TYPE_STRUCT_RFILE) && \ - defined(HAVE_ST_PATHV) -/* MRI 1.9 */ -static void set_file_path(VALUE io, VALUE path) -{ - rb_io_t *fptr = RFILE(io)->fptr; - fptr->pathv = rb_str_new4(path); -} -#elif defined(HAVE_TYPE_OPENFILE) && \ - defined(HAVE_TYPE_STRUCT_RFILE) && \ - defined(HAVE_ST_PATH) -/* MRI 1.8 */ -#include "util.h" -static void set_file_path(VALUE io, VALUE path) -{ - OpenFile *fptr = RFILE(io)->fptr; - fptr->path = ruby_strdup(RSTRING_PTR(path)); -} -#else -/* Rubinius */ static void set_file_path(VALUE io, VALUE path) { rb_iv_set(io, "@path", rb_str_new4(path)); } -#endif |