diff options
| author | Yukihiro "Matz" Matsumoto <[email protected]> | 2013-01-07 01:28:48 -0800 |
|---|---|---|
| committer | Yukihiro "Matz" Matsumoto <[email protected]> | 2013-01-07 01:28:48 -0800 |
| commit | 52d654b9963ae02d63d226b94f80cd1248cb28ec (patch) | |
| tree | cb986834e252136d90c85ab10c858244ff35b0de | |
| parent | 4258d7735beec9252bf6cb282fb704cb2cbe9ce9 (diff) | |
| parent | 0f99322f27338d759b86551363a7275e53627a72 (diff) | |
| download | mruby-52d654b9963ae02d63d226b94f80cd1248cb28ec.tar.gz mruby-52d654b9963ae02d63d226b94f80cd1248cb28ec.zip | |
Merge pull request #701 from monaka/pr-remove-debug-macros
Remove debug macros from mruby.h
| -rw-r--r-- | include/mruby.h | 10 | ||||
| -rw-r--r-- | src/gc.c | 2 | ||||
| -rw-r--r-- | src/vm.c | 6 |
3 files changed, 7 insertions, 11 deletions
diff --git a/include/mruby.h b/include/mruby.h index 197961c86..480a764e5 100644 --- a/include/mruby.h +++ b/include/mruby.h @@ -241,16 +241,6 @@ void mrb_write_barrier(mrb_state *, struct RBasic*); #define MRUBY_VERSION "Rite" -#ifdef DEBUG -#undef DEBUG -#endif - -#if 0 -#define DEBUG(x) x -#else -#define DEBUG(x) -#endif - mrb_value mrb_check_convert_type(mrb_state *mrb, mrb_value val, mrb_int type, const char *tname, const char *method); mrb_value mrb_any_to_s(mrb_state *mrb, mrb_value obj); const char * mrb_obj_classname(mrb_state *mrb, mrb_value obj); @@ -147,8 +147,10 @@ gettimeofday_time(void) #ifdef GC_DEBUG #include <assert.h> #define gc_assert(expect) assert(expect) +#define DEBUG(x) (x) #else #define gc_assert(expect) ((void)0) +#define DEBUG(x) #endif #define GC_STEP_SIZE 1024 @@ -49,7 +49,11 @@ The value below allows about 60000 recursive calls in the simplest case. */ #define MRB_STACK_MAX ((1<<18) - MRB_STACK_GROWTH) #endif - +#ifdef VM_DEBUG +# define DEBUG(x) (x) +#else +# define DEBUG(x) +#endif static inline void stack_copy(mrb_value *dst, const mrb_value *src, size_t size) |
