diff options
| author | Ryan Scott <[email protected]> | 2013-05-18 10:46:55 +1000 |
|---|---|---|
| committer | Ryan Scott <[email protected]> | 2013-05-18 10:46:55 +1000 |
| commit | 391807b73c2ced4a7dd49e417ab14e4c81b4ec70 (patch) | |
| tree | e209fdb7a61a5fd2136befffe3e564454323db32 /mrbgems/mruby-objectspace/src/mruby_objectspace.c | |
| parent | e36a0275e10903aaddea7c79832d053ba0aa28f6 (diff) | |
| download | mruby-391807b73c2ced4a7dd49e417ab14e4c81b4ec70.tar.gz mruby-391807b73c2ced4a7dd49e417ab14e4c81b4ec70.zip | |
Changed the counting so that only objects that are alive are added to the object counts.
Diffstat (limited to 'mrbgems/mruby-objectspace/src/mruby_objectspace.c')
| -rw-r--r-- | mrbgems/mruby-objectspace/src/mruby_objectspace.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/mrbgems/mruby-objectspace/src/mruby_objectspace.c b/mrbgems/mruby-objectspace/src/mruby_objectspace.c index 924eeb0e1..0dc94d792 100644 --- a/mrbgems/mruby-objectspace/src/mruby_objectspace.c +++ b/mrbgems/mruby-objectspace/src/mruby_objectspace.c @@ -35,11 +35,11 @@ void os_count_object_type(mrb_state *mrb, struct RBasic* obj, void *data) { struct os_count_struct* obj_count; obj_count = (struct os_count_struct*)(data); - obj_count->counts[obj->tt]++; if (is_dead(mrb, obj)) { obj_count->freed++; } else { + obj_count->counts[obj->tt]++; obj_count->total++; } } |
