mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
Changed the object_count so that it only iterates over the RBasic object, not the full RVALUE known by the GC
This commit is contained in:
+2
-31
@@ -12,38 +12,9 @@ extern "C" {
|
||||
#endif
|
||||
|
||||
#include "mruby.h"
|
||||
#include "mruby/array.h"
|
||||
#include "mruby/class.h"
|
||||
#include "mruby/data.h"
|
||||
#include "mruby/hash.h"
|
||||
#include "mruby/proc.h"
|
||||
#include "mruby/range.h"
|
||||
#include "mruby/string.h"
|
||||
#include "mruby/variable.h"
|
||||
#include "mruby/value.h"
|
||||
|
||||
struct free_obj {
|
||||
MRB_OBJECT_HEADER;
|
||||
struct RBasic *next;
|
||||
};
|
||||
|
||||
struct RVALUE {
|
||||
union {
|
||||
struct free_obj free;
|
||||
struct RBasic basic;
|
||||
struct RObject object;
|
||||
struct RClass klass;
|
||||
struct RString string;
|
||||
struct RArray array;
|
||||
struct RHash hash;
|
||||
struct RRange range;
|
||||
struct RData data;
|
||||
struct RProc proc;
|
||||
} as;
|
||||
};
|
||||
|
||||
typedef struct RVALUE RVALUE;
|
||||
|
||||
typedef int each_object_callback(RVALUE *obj, void *data);
|
||||
typedef int each_object_callback(mrb_state *mrb, struct RBasic obj, void *data);
|
||||
void mrb_objspace_each_objects(mrb_state *mrb, each_object_callback* callback, void *data);
|
||||
|
||||
#if defined(__cplusplus)
|
||||
|
||||
Reference in New Issue
Block a user