diff options
author | usa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2006-08-31 11:24:44 +0000 |
---|---|---|
committer | usa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2006-08-31 11:24:44 +0000 |
commit | 5b5e4a6fc1e2829e6a2e1fb41986e951070646c7 (patch) | |
tree | edc5c2dd23e5782b76695b8e22b5f67a4fbdbadf /io.c | |
parent | 54af80844fbcf132f85e9275673eaa66b72da996 (diff) |
* file.c (test_identical, rb_file_s_truncate): use RSTRING_PTR and
RSTRING_STR.
* io.c (pipe_open, rb_io_reopen): ditto.
* process.c (proc_spawn_n, rb_spawn): ditto.
* util.c (ruby_add_suffix): ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10811 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'io.c')
-rw-r--r-- | io.c | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -3047,12 +3047,12 @@ pipe_open(int argc, VALUE *argv, const char *mode) int i; for (i = 0; i < argc; ++i) { - args[i] = RSTRING(argv[i])->ptr; + args[i] = RSTRING_PTR(argv[i]); } args[i] = NULL; cmd = ALLOCA_N(char, rb_w32_argv_size(args)); rb_w32_join_argv(cmd, args); - exename = RSTRING(prog)->ptr; + exename = RSTRING_PTR(prog); } else { cmd = StringValueCStr(prog); @@ -3067,7 +3067,7 @@ pipe_open(int argc, VALUE *argv, const char *mode) rb_thread_sleep(1); break; default: - rb_sys_fail(RSTRING(prog)->ptr); + rb_sys_fail(RSTRING_PTR(prog)); break; } } @@ -3075,7 +3075,7 @@ pipe_open(int argc, VALUE *argv, const char *mode) if (argc) prog = rb_ary_join(rb_ary_new4(argc, argv), rb_str_new2(" ")); fp = popen(StringValueCStr(prog), mode); - if (!fp) rb_sys_fail(RSTRING(prog)->ptr); + if (!fp) rb_sys_fail(RSTRING_PTR(prog)); fd = fileno(fp); #endif @@ -3566,7 +3566,7 @@ rb_io_reopen(int argc, VALUE *argv, VALUE file) fptr->fd = fileno(fptr->stdio_file); #ifdef USE_SETVBUF if (setvbuf(fptr->stdio_file, NULL, _IOFBF, 0) != 0) - rb_warn("setvbuf() can't be honoured for %s", RSTRING(fname)->ptr); + rb_warn("setvbuf() can't be honoured for %s", RSTRING_PTR(fname)); #endif } else { |