summaryrefslogtreecommitdiff
path: root/eval_intern.h
diff options
context:
space:
mode:
authorakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-01-17 22:54:29 (GMT)
committerakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-01-17 22:54:29 (GMT)
commitc8e22ee12cb951b4bd9ac14bab62f7dfa34d3f61 (patch)
treec8678e3efb6e7de6334078a524bc873807192cc6 /eval_intern.h
parentf8cf213ba2789ecd8b477d4dcb40419a619e406a (diff)
* eval_intern.h: parenthesize macro arguments.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30590 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'eval_intern.h')
-rw-r--r--eval_intern.h14
1 files changed, 7 insertions, 7 deletions
diff --git a/eval_intern.h b/eval_intern.h
index 428a2d8..cacaa6c 100644
--- a/eval_intern.h
+++ b/eval_intern.h
@@ -65,7 +65,7 @@ char *strrchr(const char *, const char);
#endif
#define ruby_setjmp(env) RUBY_SETJMP(env)
-#define ruby_longjmp(env,val) RUBY_LONGJMP(env,val)
+#define ruby_longjmp(env,val) RUBY_LONGJMP((env),(val))
#ifdef __CYGWIN__
# ifndef _setjmp
int _setjmp(jmp_buf);
@@ -90,7 +90,7 @@ NORETURN(void _longjmp(jmp_buf, int));
So following definition is required to use select_large_fdset.
*/
#ifdef HAVE_SELECT_LARGE_FDSET
-#define select(n, r, w, e, t) select_large_fdset(n, r, w, e, t)
+#define select(n, r, w, e, t) select_large_fdset((n), (r), (w), (e), (t))
#endif
#ifdef HAVE_SYS_PARAM_H
@@ -108,7 +108,7 @@ NORETURN(void _longjmp(jmp_buf, int));
} while (0)
#define TH_PUSH_TAG(th) do { \
- rb_thread_t * const _th = th; \
+ rb_thread_t * const _th = (th); \
struct rb_vm_tag _tag; \
_tag.tag = 0; \
_tag.prev = _th->tag; \
@@ -130,10 +130,10 @@ NORETURN(void _longjmp(jmp_buf, int));
TH_EXEC_TAG()
#define TH_JUMP_TAG(th, st) do { \
- ruby_longjmp(th->tag->buf,(st)); \
+ ruby_longjmp((th)->tag->buf,(st)); \
} while (0)
-#define JUMP_TAG(st) TH_JUMP_TAG(GET_THREAD(), st)
+#define JUMP_TAG(st) TH_JUMP_TAG(GET_THREAD(), (st))
enum ruby_tag_type {
RUBY_TAG_RETURN = 0x1,
@@ -172,7 +172,7 @@ enum ruby_tag_type {
#define SCOPE_SET(f) (rb_vm_cref()->nd_visi = (f))
#define CHECK_STACK_OVERFLOW(cfp, margin) do \
- if ((VALUE *)((char *)(((VALUE *)(cfp)->sp) + (margin)) + sizeof(rb_control_frame_t)) >= ((VALUE *)cfp)) { \
+ if ((VALUE *)((char *)(((VALUE *)(cfp)->sp) + (margin)) + sizeof(rb_control_frame_t)) >= ((VALUE *)(cfp))) { \
rb_exc_raise(sysstack_error); \
} \
while (0)
@@ -213,7 +213,7 @@ VALUE rb_vm_cbase(void);
void rb_trap_restore_mask(void);
#ifndef CharNext /* defined as CharNext[AW] on Windows. */
-#define CharNext(p) ((p) + mblen(p, RUBY_MBCHAR_MAXSIZE))
+#define CharNext(p) ((p) + mblen((p), RUBY_MBCHAR_MAXSIZE))
#endif
#if defined DOSISH || defined __CYGWIN__