ruby.c (ruby_init_loadpath_safe): constify
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63263 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
4ac7702814
commit
8036af48a5
10
ruby.c
10
ruby.c
@ -507,7 +507,7 @@ ruby_init_loadpath_safe(int safe_level)
|
|||||||
char *libpath;
|
char *libpath;
|
||||||
VALUE sopath;
|
VALUE sopath;
|
||||||
size_t baselen;
|
size_t baselen;
|
||||||
char *p;
|
const char *p;
|
||||||
|
|
||||||
#if defined _WIN32 || defined __CYGWIN__
|
#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);
|
size_t newsize = cygwin_conv_path(win_to_posix, libpath, 0, 0);
|
||||||
if (newsize > 0) {
|
if (newsize > 0) {
|
||||||
VALUE rubylib = rb_str_new(0, newsize);
|
VALUE rubylib = rb_str_new(0, newsize);
|
||||||
p = RSTRING_PTR(rubylib);
|
char *p2 = RSTRING_PTR(rubylib);
|
||||||
if (cygwin_conv_path(win_to_posix, libpath, p, newsize) == 0) {
|
if (cygwin_conv_path(win_to_posix, libpath, p2, newsize) == 0) {
|
||||||
rb_str_resize(sopath, 0);
|
rb_str_resize(sopath, 0);
|
||||||
sopath = rubylib;
|
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;
|
const ptrdiff_t libdir_len = (ptrdiff_t)sizeof(libdir) - 1;
|
||||||
|
|
||||||
#ifdef ENABLE_MULTIARCH
|
#ifdef ENABLE_MULTIARCH
|
||||||
char *p2 = NULL;
|
const char *p2 = NULL;
|
||||||
|
|
||||||
multiarch:
|
multiarch:
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
x
Reference in New Issue
Block a user