diff options
| author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-12-26 04:29:37 +0000 |
|---|---|---|
| committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-12-26 04:29:37 +0000 |
| commit | a2f4666e76373f744354e30ce2326327f8eb00ec (patch) | |
| tree | 60acbf259330c54bcedb5d1565dab6e78a2c7053 | |
| parent | 0d2e1552944fe5cedde0541d4a74828827268019 (diff) | |
| download | ruby-a2f4666e76373f744354e30ce2326327f8eb00ec.tar.gz ruby-a2f4666e76373f744354e30ce2326327f8eb00ec.tar.xz ruby-a2f4666e76373f744354e30ce2326327f8eb00ec.zip | |
* array.c (tmpbuf): use rb_str_tmp_new().
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@14714 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
| -rw-r--r-- | ChangeLog | 4 | ||||
| -rw-r--r-- | array.c | 10 |
2 files changed, 6 insertions, 8 deletions
@@ -1,3 +1,7 @@ +Wed Dec 26 13:29:35 2007 Nobuyoshi Nakada <nobu@ruby-lang.org> + + * array.c (tmpbuf): use rb_str_tmp_new(). + Wed Dec 26 00:57:53 2007 Nobuyoshi Nakada <nobu@ruby-lang.org> * ext/json/ext/generator/generator.c (Init_generator): requires @@ -2969,14 +2969,8 @@ rb_ary_cycle(VALUE ary) return Qnil; } -static VALUE -tmpbuf(int n, int size) -{ - VALUE buf = rb_str_new(0, n*size); - - RBASIC(buf)->klass = 0; - return buf; -} +VALUE rb_str_tmp_new(long); +#define tmpbuf(n, size) rb_str_tmp_new((n)*(size)) /* * Recursively compute permutations of r elements of the set [0..n-1]. |
