* enum.c (enum_sort_by): add WBs.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50012 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
92fa998ce7
commit
9c64155f30
@ -1,3 +1,7 @@
|
|||||||
|
Thu Mar 19 04:46:36 2015 Koichi Sasada <ko1@atdot.net>
|
||||||
|
|
||||||
|
* enum.c (enum_sort_by): add WBs.
|
||||||
|
|
||||||
Thu Mar 19 03:37:52 2015 Koichi Sasada <ko1@atdot.net>
|
Thu Mar 19 03:37:52 2015 Koichi Sasada <ko1@atdot.net>
|
||||||
|
|
||||||
* gc.c (check_rvalue_consistency): refactoring.
|
* gc.c (check_rvalue_consistency): refactoring.
|
||||||
|
8
enum.c
8
enum.c
@ -846,8 +846,8 @@ enum_sort(VALUE obj)
|
|||||||
|
|
||||||
#define SORT_BY_BUFSIZE 16
|
#define SORT_BY_BUFSIZE 16
|
||||||
struct sort_by_data {
|
struct sort_by_data {
|
||||||
VALUE ary;
|
const VALUE ary;
|
||||||
VALUE buf;
|
const VALUE buf;
|
||||||
long n;
|
long n;
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -989,8 +989,8 @@ enum_sort_by(VALUE obj)
|
|||||||
memo = MEMO_NEW(0, 0, 0);
|
memo = MEMO_NEW(0, 0, 0);
|
||||||
OBJ_INFECT(memo, obj);
|
OBJ_INFECT(memo, obj);
|
||||||
data = (struct sort_by_data *)&memo->v1;
|
data = (struct sort_by_data *)&memo->v1;
|
||||||
data->ary = ary;
|
RB_OBJ_WRITE(memo, &data->ary, ary);
|
||||||
data->buf = buf;
|
RB_OBJ_WRITE(memo, &data->buf, buf);
|
||||||
data->n = 0;
|
data->n = 0;
|
||||||
rb_block_call(obj, id_each, 0, 0, sort_by_i, (VALUE)memo);
|
rb_block_call(obj, id_each, 0, 0, sort_by_i, (VALUE)memo);
|
||||||
ary = data->ary;
|
ary = data->ary;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user