diff options
| author | Hiroshi Mimaki <[email protected]> | 2020-06-05 12:42:56 +0900 |
|---|---|---|
| committer | Hiroshi Mimaki <[email protected]> | 2020-06-05 12:42:56 +0900 |
| commit | 81d340e0421daf39a8208a0181d6a54e726db134 (patch) | |
| tree | 18cefdd763a716dbd27c23bfdf98ffa2135f7624 /include/mruby.h | |
| parent | f9d113f7647121f8578742a2a9ac256ece365e3f (diff) | |
| parent | 4e40169ed6d200918e542aa8d8e64634794e1864 (diff) | |
| download | mruby-81d340e0421daf39a8208a0181d6a54e726db134.tar.gz mruby-81d340e0421daf39a8208a0181d6a54e726db134.zip | |
Merge master.
Diffstat (limited to 'include/mruby.h')
| -rw-r--r-- | include/mruby.h | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/include/mruby.h b/include/mruby.h index e96a4bfd3..fef4a0d47 100644 --- a/include/mruby.h +++ b/include/mruby.h @@ -76,6 +76,7 @@ #include <mruby/version.h> #ifndef MRB_WITHOUT_FLOAT +#include <float.h> #ifndef FLT_EPSILON #define FLT_EPSILON (1.19209290e-07f) #endif @@ -164,8 +165,8 @@ struct mrb_context { struct RProc **ensure; /* ensure handler stack */ uint16_t esize, eidx; - enum mrb_fiber_state status; - mrb_bool vmexec; + enum mrb_fiber_state status : 4; + mrb_bool vmexec : 1; struct RFiber *fib; }; @@ -317,7 +318,9 @@ MRB_API struct RClass *mrb_define_class(mrb_state *mrb, const char *name, struct * @return [struct RClass *] Reference to the newly defined module. */ MRB_API struct RClass *mrb_define_module(mrb_state *mrb, const char *name); + MRB_API mrb_value mrb_singleton_class(mrb_state *mrb, mrb_value val); +MRB_API struct RClass *mrb_singleton_class_ptr(mrb_state *mrb, mrb_value val); /** * Include a module in another class or module. @@ -1148,7 +1151,6 @@ MRB_API void mrb_close(mrb_state *mrb); MRB_API void* mrb_default_allocf(mrb_state*, void*, size_t, void*); MRB_API mrb_value mrb_top_self(mrb_state *mrb); -MRB_API mrb_value mrb_run(mrb_state *mrb, struct RProc* proc, mrb_value self); MRB_API mrb_value mrb_top_run(mrb_state *mrb, struct RProc *proc, mrb_value self, unsigned int stack_keep); MRB_API mrb_value mrb_vm_run(mrb_state *mrb, struct RProc *proc, mrb_value self, unsigned int stack_keep); MRB_API mrb_value mrb_vm_exec(mrb_state *mrb, struct RProc *proc, const mrb_code *iseq); |
