summaryrefslogtreecommitdiff
path: root/io.c
diff options
context:
space:
mode:
Diffstat (limited to 'io.c')
-rw-r--r--io.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/io.c b/io.c
index d454d33edd..4118872972 100644
--- a/io.c
+++ b/io.c
@@ -3030,7 +3030,7 @@ pipe_open(pstr, pname, mode)
#if defined(DJGPP) || defined(__human68k__) || defined(__VMS)
FILE *f;
- if (!pname) pname = StringValuePtr(pstr);
+ if (!pname) pname = StringValueCStr(pstr);
f = popen(pname, mode);
if (!f) rb_sys_fail(pname);
@@ -3055,8 +3055,7 @@ pipe_open(pstr, pname, mode)
int pid;
FILE *fpr, *fpw;
- if (!pname) pname = StringValuePtr(pstr);
-
+ if (!pname) pname = StringValueCStr(pstr);
retry:
pid = pipe_exec(pname, rb_io_mode_modenum(mode), &fpr, &fpw);
if (pid == -1) { /* exec failed */
@@ -3089,7 +3088,7 @@ retry:
int pid, pr[2], pw[2];
volatile int doexec;
- if (!pname) pname = StringValuePtr(pstr);
+ if (!pname) pname = StringValueCStr(pstr);
if (((modef & FMODE_READABLE) && pipe(pr) == -1) ||
((modef & FMODE_WRITABLE) && pipe(pw) == -1))