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 | 0c48720b466b00e7187af8b2293e6576ec4d960f (patch) | |
tree | 60acbf259330c54bcedb5d1565dab6e78a2c7053 /array.c | |
parent | a3f722abef303678ec1926ba835fdefb6bd98b33 (diff) | |
download | ruby-0c48720b466b00e7187af8b2293e6576ec4d960f.tar.gz |
* array.c (tmpbuf): use rb_str_tmp_new().
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14714 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'array.c')
-rw-r--r-- | array.c | 10 |
1 files changed, 2 insertions, 8 deletions
@@ -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]. |