vm_exec.h: fix CHECK_VM_STACK_OVERFLOW_FOR_INSN

* vm_exec.h (CHECK_VM_STACK_OVERFLOW_FOR_INSN): surround with
  do/while (0), and remove unnecessary casts.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42196 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2013-07-26 13:14:22 +00:00
Родитель 9d00f3f536
Коммит 2d9a4afb13
2 изменённых файлов: 12 добавлений и 4 удалений

Просмотреть файл

@ -1,3 +1,8 @@
Fri Jul 26 22:14:10 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
* vm_exec.h (CHECK_VM_STACK_OVERFLOW_FOR_INSN): surround with
do/while (0), and remove unnecessary casts.
Fri Jul 26 20:12:07 2013 Akinori MUSHA <knu@iDaemons.org>
* ext/syslog/lib/syslog/logger.rb (Syslog::Logger): Add facility

Просмотреть файл

@ -169,9 +169,12 @@ default: \
#endif
#define SCREG(r) (reg_##r)
#define CHECK_VM_STACK_OVERFLOW_FOR_INSN(cfp, margin) \
if ((VALUE *)((char *)(((VALUE *)(cfp)->sp) + (margin)) + sizeof(rb_control_frame_t)) >= ((VALUE *)(cfp))) { \
rb_bug("CHECK_VM_STACK_OVERFLOW_FOR_INSN: should not overflow here. Please contact ruby-core/dev with your (a part of) script. This check will be removed soon."); \
} while (0);
#define CHECK_VM_STACK_OVERFLOW_FOR_INSN(cfp, margin) do { \
if (((rb_control_frame_t *)(((cfp)->sp) + (margin)) + 1) >= (cfp)) { \
rb_bug("CHECK_VM_STACK_OVERFLOW_FOR_INSN: should not overflow here. " \
"Please contact ruby-core/dev with your (a part of) script. " \
"This check will be removed soon."); \
} \
} while (0)
#endif /* RUBY_VM_EXEC_H */