mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
Remove DEBUG_ONLY_EXPR() from CHECKPOINT_* macros; ref #5060
To allow C++ compilation. Fix suggested by @dearblue.
This commit is contained in:
@@ -919,29 +919,19 @@ prepare_tagged_break(mrb_state *mrb, uint32_t tag, const struct RProc *proc, mrb
|
||||
|
||||
#define CHECKPOINT_RESTORE(tag) \
|
||||
do { \
|
||||
DEBUG_ONLY_EXPR(int current_checkpoint_tag = (tag)); \
|
||||
if (FALSE) { \
|
||||
CHECKPOINT_LABEL_MAKE(tag): \
|
||||
DEBUG_ONLY_EXPR(current_checkpoint_tag = (tag)); \
|
||||
do {
|
||||
|
||||
#define CHECKPOINT_MAIN(tag) \
|
||||
} while (0); \
|
||||
} \
|
||||
DEBUG_ONLY_EXPR(mrb_assert((tag) == current_checkpoint_tag)); \
|
||||
do {
|
||||
|
||||
#define CHECKPOINT_END(tag) \
|
||||
} while (0); \
|
||||
DEBUG_ONLY_EXPR(mrb_assert((tag) == current_checkpoint_tag)); \
|
||||
} while (0)
|
||||
|
||||
#ifdef MRB_DEBUG
|
||||
#define DEBUG_ONLY_EXPR(e) e
|
||||
#else
|
||||
#define DEBUG_ONLY_EXPR(e) ((void)0)
|
||||
#endif
|
||||
|
||||
#define ERR_PC_SET(mrb) mrb->c->ci->err = pc0;
|
||||
#define ERR_PC_CLR(mrb) mrb->c->ci->err = 0;
|
||||
#ifdef MRB_ENABLE_DEBUG_HOOK
|
||||
|
||||
Reference in New Issue
Block a user