summaryrefslogtreecommitdiff
path: root/ruby.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-04-26 12:36:26 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-04-26 12:36:26 +0000
commit8036af48a524977be1fd17c64d961531b1913b47 (patch)
tree3cfedc0820c7069f34feabdb2bbe7bf1b5cafa9f /ruby.c
parent4ac77028144c6dd0dd03d451879aa281de8aad30 (diff)
downloadruby-8036af48a524977be1fd17c64d961531b1913b47.tar.gz
ruby.c (ruby_init_loadpath_safe): constify
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63263 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ruby.c')
-rw-r--r--ruby.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/ruby.c b/ruby.c
index 90b20264f8..2bed81fc45 100644
--- a/ruby.c
+++ b/ruby.c
@@ -507,7 +507,7 @@ ruby_init_loadpath_safe(int safe_level)
char *libpath;
VALUE sopath;
size_t baselen;
- char *p;
+ const char *p;
#if defined _WIN32 || defined __CYGWIN__
{
@@ -549,11 +549,11 @@ ruby_init_loadpath_safe(int safe_level)
size_t newsize = cygwin_conv_path(win_to_posix, libpath, 0, 0);
if (newsize > 0) {
VALUE rubylib = rb_str_new(0, newsize);
- p = RSTRING_PTR(rubylib);
- if (cygwin_conv_path(win_to_posix, libpath, p, newsize) == 0) {
+ char *p2 = RSTRING_PTR(rubylib);
+ if (cygwin_conv_path(win_to_posix, libpath, p2, newsize) == 0) {
rb_str_resize(sopath, 0);
sopath = rubylib;
- libpath = p;
+ libpath = p2;
}
}
}
@@ -570,7 +570,7 @@ ruby_init_loadpath_safe(int safe_level)
const ptrdiff_t libdir_len = (ptrdiff_t)sizeof(libdir) - 1;
#ifdef ENABLE_MULTIARCH
- char *p2 = NULL;
+ const char *p2 = NULL;
multiarch:
#endif