summaryrefslogtreecommitdiffstats
path: root/regex.c
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2002-04-25 13:57:01 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2002-04-25 13:57:01 +0000
commit8969c2a04a2750026f99f8d0e314d184eed80676 (patch)
tree3aad53ec0421149c8fb9e163379bba8efb2ab42e /regex.c
parent1b8f663bfa3253cef4a9adeb5bda26e327daee2a (diff)
downloadruby-8969c2a04a2750026f99f8d0e314d184eed80676.tar.gz
ruby-8969c2a04a2750026f99f8d0e314d184eed80676.tar.xz
ruby-8969c2a04a2750026f99f8d0e314d184eed80676.zip
* various files: macro fix-up by Michal Rokos.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@2411 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'regex.c')
-rw-r--r--regex.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/regex.c b/regex.c
index 020b8c8d4..9eea9e480 100644
--- a/regex.c
+++ b/regex.c
@@ -69,9 +69,11 @@ extern int rb_prohibit_interrupt;
extern int rb_trap_pending;
void rb_trap_exec _((void));
-# define CHECK_INTS if (!rb_prohibit_interrupt) {\
- if (rb_trap_pending) rb_trap_exec();\
-}
+# define CHECK_INTS do {\
+ if (!rb_prohibit_interrupt) {\
+ if (rb_trap_pending) rb_trap_exec();\
+ }\
+} while (0)
#endif
/* Make alloca work the best possible way. */
@@ -419,7 +421,6 @@ re_set_syntax(syntax)
return 0;
}
-
/* Macros for re_compile_pattern, which is found below these definitions. */
#define TRANSLATE_P() ((options&RE_OPTION_IGNORECASE) && translate)