summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-10-10 02:27:41 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-10-10 02:27:41 +0000
commit91e305bcda2e669cd4196b8e0103fb441fa4cc6e (patch)
tree896820572b9df379a6199e980e65a21e01f7c0a3 /ext
parent9631e3e788f95449d4b81395889c07670ef2dc82 (diff)
ruby/io.h: deprecate old macros
* include/ruby/io.h (rb_io_mode_flags, rb_io_modenum_flags): deprecate old macros for compatibility for ruby 1.8 and older. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47861 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext')
-rw-r--r--ext/pty/pty.c4
-rw-r--r--ext/stringio/stringio.c4
2 files changed, 4 insertions, 4 deletions
diff --git a/ext/pty/pty.c b/ext/pty/pty.c
index 3ea5d5c..18983f4 100644
--- a/ext/pty/pty.c
+++ b/ext/pty/pty.c
@@ -590,11 +590,11 @@ pty_getpty(int argc, VALUE *argv, VALUE self)
establishShell(argc, argv, &info, SlaveName);
- rfptr->mode = rb_io_mode_flags("r");
+ rfptr->mode = rb_io_modestr_fmode("r");
rfptr->fd = info.fd;
rfptr->pathv = rb_obj_freeze(rb_str_new_cstr(SlaveName));
- wfptr->mode = rb_io_mode_flags("w") | FMODE_SYNC;
+ wfptr->mode = rb_io_modestr_fmode("w") | FMODE_SYNC;
wfptr->fd = rb_cloexec_dup(info.fd);
if (wfptr->fd == -1)
rb_sys_fail("dup()");
diff --git a/ext/stringio/stringio.c b/ext/stringio/stringio.c
index bf39a87..ae38430 100644
--- a/ext/stringio/stringio.c
+++ b/ext/stringio/stringio.c
@@ -186,12 +186,12 @@ strio_init(int argc, VALUE *argv, struct StringIO *ptr, VALUE self)
case 2:
if (FIXNUM_P(mode)) {
int flags = FIX2INT(mode);
- ptr->flags = rb_io_modenum_flags(flags);
+ ptr->flags = rb_io_oflags_fmode(flags);
trunc = flags & O_TRUNC;
}
else {
const char *m = StringValueCStr(mode);
- ptr->flags = rb_io_mode_flags(m);
+ ptr->flags = rb_io_modestr_fmode(m);
trunc = *m == 'w';
}
StringValue(string);