mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
rework mruby-objectspace and gc.[ch]
- functions should have C linkage (for C++ code) - add prefix to each_object_callback - use more appropriate variable types / initialization - ObjectSpace::count_objects has 1 opt. arg. - prefer mrb_intern_lit to mrb_intern_cstr for str. lit. - mruby/value.h is included by mruby.h - adjust coding style
This commit is contained in:
+9
-4
@@ -7,11 +7,16 @@
|
||||
#ifndef MRUBY_GC_H
|
||||
#define MRUBY_GC_H
|
||||
|
||||
#include "mruby.h"
|
||||
#include "mruby/value.h"
|
||||
#if defined(__cplusplus)
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
typedef void (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);
|
||||
typedef void (mrb_each_object_callback)(mrb_state *mrb, struct RBasic *obj, void *data);
|
||||
void mrb_objspace_each_objects(mrb_state *mrb, mrb_each_object_callback *callback, void *data);
|
||||
void mrb_free_context(mrb_state *mrb, struct mrb_context *c);
|
||||
|
||||
#if defined(__cplusplus)
|
||||
} /* extern "C" { */
|
||||
#endif
|
||||
|
||||
#endif /* MRUBY_GC_H */
|
||||
|
||||
Reference in New Issue
Block a user