diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-12-10 08:46:06 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-12-10 08:46:06 +0000 |
commit | 3a3bda73dd0e5d6803f2aecfe7415804268d9251 (patch) | |
tree | 2bc807a34bf898b83968d4925e45365797cafda9 /string.c | |
parent | 38b92f838f0c387807e5f430277af5cd7196cd71 (diff) | |
download | ruby-3a3bda73dd0e5d6803f2aecfe7415804268d9251.tar.gz |
* string.c (rb_str_tmp_new): creates hidden temporary buffer.
* transcode.c (transcoding): added a pointer to function to flush.
* transcode.c (transcode_loop): do not use string internal.
[ruby-dev:32512]
* transcode.c (str_transcode): allow Encoding objects.
* transcode_data.h (BYTE_LOOKUP): use actual struct name.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14176 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'string.c')
-rw-r--r-- | string.c | 12 |
1 files changed, 9 insertions, 3 deletions
@@ -179,7 +179,7 @@ str_alloc(VALUE klass) return (VALUE)str; } -VALUE +static VALUE str_new(VALUE klass, const char *ptr, long len) { VALUE str; @@ -370,6 +370,12 @@ rb_str_buf_new2(const char *ptr) return str; } +VALUE +rb_str_tmp_new(long len) +{ + return str_new(0, 0, len); +} + void rb_str_free(VALUE str) { @@ -384,7 +390,7 @@ rb_str_to_str(VALUE str) return rb_convert_type(str, T_STRING, "String", "to_str"); } -static void +void rb_str_shared_replace(VALUE str, VALUE str2) { if (str == str2) return; @@ -625,7 +631,7 @@ str_modifiable(VALUE str) rb_raise(rb_eSecurityError, "Insecure: can't modify string"); } -int +static int str_independent(VALUE str) { str_modifiable(str); |