diff options
author | shyouhei <shyouhei@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-09-07 06:14:19 +0000 |
---|---|---|
committer | shyouhei <shyouhei@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-09-07 06:14:19 +0000 |
commit | 3f5df75e7338489a0a77acbfa4f35d4f20e38bcc (patch) | |
tree | aeee3e775360e91a0b5b5f49120eae3751ce3440 /ruby.c | |
parent | 3106687fec3d447d77b93c93042ff932d782b0d4 (diff) |
* ruby.c (rubylib_mangled_path): eliminate RSTRING_PTR
[ruby-dev:31679]
* ruby.c (push_include_cygwin): ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8_5@13377 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ruby.c')
-rw-r--r-- | ruby.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -162,7 +162,7 @@ rubylib_mangled_path(const char *s, unsigned int l) return rb_str_new(s, l); } ret = rb_str_new(0, l + newl - oldl); - ptr = RSTRING_PTR(ret); + ptr = RSTRING(ret)->ptr; memcpy(ptr, newp, newl); memcpy(ptr + newl, s + oldl, l - oldl); ptr[l + newl - oldl] = 0; @@ -218,11 +218,11 @@ push_include_cygwin(const char *path) if (*s) { if (!buf) { buf = rb_str_new(p, len); - p = RSTRING_PTR(buf); + p = RSTRING(buf)->ptr; } else { rb_str_resize(buf, len); - p = strncpy(RSTRING_PTR(buf), p, len); + p = strncpy(RSTRING(buf)->ptr, p, len); } } if (cygwin_conv_to_posix_path(p, rubylib) == 0) |