diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-12-27 02:01:24 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-12-27 02:01:24 +0000 |
commit | 9e1da70e1478583dfaeac97652599fff1c56f493 (patch) | |
tree | 99b70be2522ba5ab31383a28e5fffee99a7b4742 /string.c | |
parent | 55180306ddab6b92c8af08f76e3c6287823e1cce (diff) |
* intern.h, string.c (rb_str_set_len): added for upgrading path from
1.8 to 1.9. [ruby-dev:32807]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@14727 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'string.c')
-rw-r--r-- | string.c | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -671,6 +671,13 @@ rb_str_unlocktmp(str) return str; } +void +rb_str_set_len(VALUE str, long len) +{ + RSTRING(str)->len = len; + RSTRING(str)->ptr[len] = '\0'; +} + VALUE rb_str_resize(str, len) VALUE str; |