ruby-changes:23995
From: nobu <ko1@a...>
Date: Wed, 13 Jun 2012 09:54:41 +0900 (JST)
Subject: [ruby-changes:23995] nobu:r36046 (trunk): process.c: constified
nobu 2012-06-13 09:54:32 +0900 (Wed, 13 Jun 2012) New Revision: 36046 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=36046 Log: process.c: constified * process.c (rb_exec_fillarg): constified. Modified files: trunk/process.c Index: process.c =================================================================== --- process.c (revision 36045) +++ process.c (revision 36046) @@ -1850,7 +1850,7 @@ #ifndef _WIN32 if (e->use_shell) { - char *p; + const char *p; int has_meta = 0; int has_nonspace = 0; /* @@ -1897,7 +1897,7 @@ while (*p == ' ' || *p == '\t') p++; if (*p) { - char *w = p; + const char *w = p; while (*p && *p != ' ' && *p != '\t') p++; rb_str_buf_cat(argv_buf, w, p-w); @@ -1911,7 +1911,7 @@ #endif if (!e->use_shell) { - char *abspath; + const char *abspath; abspath = dln_find_exe_r(RSTRING_PTR(e->invoke.cmd.command_name), 0, fbuf, sizeof(fbuf)); if (abspath) e->invoke.cmd.command_abspath = rb_str_new_cstr(abspath); @@ -1932,7 +1932,7 @@ } if (!e->use_shell) { - char *p, *ep, *null=NULL; + const char *p, *ep, *null=NULL; VALUE argv_str; argv_str = hide_obj(rb_str_buf_new(sizeof(char*) * (argc + 2))); rb_str_buf_cat(argv_str, (char *)&null, sizeof(null)); /* place holder for /bin/sh of try_with_sh. */ -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/