Skip to content

Commit 3774c24

Browse files
committed
Make rb_gc_impl_stat_heap return a VALUE
1 parent 90d871b commit 3774c24

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

gc/mmtk.c

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1303,10 +1303,15 @@ rb_gc_impl_stat(void *objspace_ptr, VALUE hash_or_sym)
13031303
return hash;
13041304
}
13051305

1306-
size_t
1306+
VALUE
13071307
rb_gc_impl_stat_heap(void *objspace_ptr, VALUE heap_name, VALUE hash_or_sym)
13081308
{
1309-
return 0;
1309+
if (RB_TYPE_P(hash_or_sym, T_HASH)) {
1310+
return hash_or_sym;
1311+
}
1312+
else {
1313+
return Qundef;
1314+
}
13101315
}
13111316

13121317
// Miscellaneous

0 commit comments

Comments
 (0)