File tree Expand file tree Collapse file tree 2 files changed +11
-10
lines changed Expand file tree Collapse file tree 2 files changed +11
-10
lines changed Original file line number Diff line number Diff line change
1
+ Tue Dec 10 15:56:48 2013 Aman Gupta <ruby@tmm1.net>
2
+
3
+ * gc.c (reflist_add): revert changes from r44109. it is unnecessary
4
+ after r44113
5
+ * gc.c (allrefs_i): fix whitespace
6
+ * gc.c (allrefs_roots_i): fix whitespace
7
+
1
8
Tue Dec 10 15:46:03 2013 Koichi Sasada <ko1@atdot.net>
2
9
3
10
* gc.c (allrefs_add): push obj only if allrefs table doesn't have
Original file line number Diff line number Diff line change @@ -4165,21 +4165,15 @@ reflist_destruct(struct reflist *refs)
4165
4165
xfree (refs );
4166
4166
}
4167
4167
4168
- static int
4168
+ static void
4169
4169
reflist_add (struct reflist * refs , VALUE obj )
4170
4170
{
4171
- int i = 0 ;
4172
4171
if (refs -> pos == refs -> size ) {
4173
4172
refs -> size *= 2 ;
4174
4173
SIZED_REALLOC_N (refs -> list , VALUE , refs -> size , refs -> size /2 );
4175
4174
}
4176
4175
4177
- for (i = 0 ; i < refs -> pos ; i ++ )
4178
- if (refs -> list [i ] == obj )
4179
- return 0 ; /* already exists */
4180
-
4181
4176
refs -> list [refs -> pos ++ ] = obj ;
4182
- return 1 ; /* added */
4183
4177
}
4184
4178
4185
4179
static void
@@ -4248,7 +4242,7 @@ allrefs_i(VALUE obj, void *ptr)
4248
4242
4249
4243
if (allrefs_add (data , obj )) {
4250
4244
push_mark_stack (& data -> objspace -> mark_stack , obj );
4251
- }
4245
+ }
4252
4246
}
4253
4247
4254
4248
static void
@@ -4259,8 +4253,8 @@ allrefs_roots_i(VALUE obj, void *ptr)
4259
4253
data -> root_obj = MAKE_ROOTSIG (data -> category );
4260
4254
4261
4255
if (allrefs_add (data , obj )) {
4262
- push_mark_stack (& data -> objspace -> mark_stack , obj );
4263
- }
4256
+ push_mark_stack (& data -> objspace -> mark_stack , obj );
4257
+ }
4264
4258
}
4265
4259
4266
4260
static st_table *
You can’t perform that action at this time.
0 commit comments