Skip to content

Commit

Permalink
gc.c: Enable DEBUG(x) if GC_DEBUG is defined.
Browse files Browse the repository at this point in the history
vm.c: Enable DEBUG(x) if VM_DEBUG is defined.
  • Loading branch information
monaka committed Jan 7, 2013
1 parent 83d91b9 commit 0f99322
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 2 additions & 0 deletions src/gc.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 5 additions & 1 deletion src/vm.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 0f99322

Please sign in to comment.