diff options
| -rw-r--r-- | doc/guides/mrbconf.md | 4 | ||||
| -rw-r--r-- | include/mrbconf.h | 8 | ||||
| -rw-r--r-- | include/mruby.h | 2 | ||||
| -rw-r--r-- | include/mruby/proc.h | 5 |
4 files changed, 10 insertions, 9 deletions
diff --git a/doc/guides/mrbconf.md b/doc/guides/mrbconf.md index 003c2b300..d662e05bf 100644 --- a/doc/guides/mrbconf.md +++ b/doc/guides/mrbconf.md @@ -171,9 +171,9 @@ largest value of required alignment. * Ignored if `MRB_NO_METHOD_CACHE` is defined. * Need to be the power of 2. -`MRB_METHOD_T_STRUCT` +`MRB_USE_METHOD_T_STRUCT` * Use C struct to represent `mrb_method_t` -* No `MRB_METHOD_T_STRUCT` requires highest 2 bits of function pointers to be zero +* No `MRB_USE_METHOD_T_STRUCT` requires highest 2 bits of function pointers to be zero * Define this macro on machines that use higher bits of pointers `MRB_ENABLE_ALL_SYMBOLS` diff --git a/include/mrbconf.h b/include/mrbconf.h index 3241346b2..734ec98e7 100644 --- a/include/mrbconf.h +++ b/include/mrbconf.h @@ -47,13 +47,13 @@ /* size of the method cache (need to be the power of 2) */ //#define MRB_METHOD_CACHE_SIZE (1<<8) -/* add -DMRB_METHOD_T_STRUCT on machines that use higher bits of pointers */ -/* no MRB_METHOD_T_STRUCT requires highest 2 bits of function pointers to be zero */ -#ifndef MRB_METHOD_T_STRUCT +/* add -DMRB_USE_METHOD_T_STRUCT on machines that use higher bits of function pointers */ +/* no MRB_USE_METHOD_T_STRUCT requires highest 2 bits of function pointers to be zero */ +#ifndef MRB_USE_METHOD_T_STRUCT // can't use highest 2 bits of function pointers at least on 32bit // Windows and 32bit Linux. # ifdef MRB_32BIT -# define MRB_METHOD_T_STRUCT +# define MRB_USE_METHOD_T_STRUCT # endif #endif diff --git a/include/mruby.h b/include/mruby.h index 9f1d1aa30..dea0a9c88 100644 --- a/include/mruby.h +++ b/include/mruby.h @@ -199,7 +199,7 @@ struct mrb_context { */ typedef mrb_value (*mrb_func_t)(struct mrb_state *mrb, mrb_value self); -#ifndef MRB_METHOD_T_STRUCT +#ifndef MRB_USE_METHOD_T_STRUCT typedef uintptr_t mrb_method_t; #else typedef struct { diff --git a/include/mruby/proc.h b/include/mruby/proc.h index fe0cf2eb0..c14c1ff9c 100644 --- a/include/mruby/proc.h +++ b/include/mruby/proc.h @@ -101,7 +101,8 @@ MRB_API mrb_value mrb_proc_cfunc_env_get(mrb_state *mrb, mrb_int idx); #define MRB_METHOD_FUNC_FL 1 #define MRB_METHOD_NOARG_FL 2 -#ifndef MRB_METHOD_T_STRUCT + +#ifndef MRB_USE_METHOD_T_STRUCT #define MRB_METHOD_FUNC_P(m) (((uintptr_t)(m))&MRB_METHOD_FUNC_FL) #define MRB_METHOD_NOARG_P(m) (((uintptr_t)(m))&MRB_METHOD_NOARG_FL) @@ -125,7 +126,7 @@ MRB_API mrb_value mrb_proc_cfunc_env_get(mrb_state *mrb, mrb_int idx); #define MRB_METHOD_PROC(m) ((m).proc) #define MRB_METHOD_UNDEF_P(m) ((m).proc==NULL) -#endif /* MRB_METHOD_T_STRUCT */ +#endif /* MRB_USE_METHOD_T_STRUCT */ #define MRB_METHOD_CFUNC_P(m) (MRB_METHOD_FUNC_P(m)?TRUE:(MRB_METHOD_PROC(m)?(MRB_PROC_CFUNC_P(MRB_METHOD_PROC(m))):FALSE)) #define MRB_METHOD_CFUNC(m) (MRB_METHOD_FUNC_P(m)?MRB_METHOD_FUNC(m):((MRB_METHOD_PROC(m)&&MRB_PROC_CFUNC_P(MRB_METHOD_PROC(m)))?MRB_PROC_CFUNC(MRB_METHOD_PROC(m)):NULL)) |
