summaryrefslogtreecommitdiff
path: root/regex.c
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>1998-06-23 10:30:12 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>1998-06-23 10:30:12 +0000
commit6a3c97169c8a671f5feda7eba2b2a7529252daf3 (patch)
tree299c92f68d6acda64e18e3e43ceda8db1d59ff61 /regex.c
parent6b15412c77fc82ceacb156e4595571dd7262ab5d (diff)
*** empty log message ***
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/v1_1r@249 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'regex.c')
-rw-r--r--regex.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/regex.c b/regex.c
index accfbdf457..fbe91ecdee 100644
--- a/regex.c
+++ b/regex.c
@@ -2824,7 +2824,7 @@ typedef union
} while(0)
#define AT_STRINGS_BEG(d) (d == string)
-#define AT_STRINGS_END(d) (d == dend)
+#define AT_STRINGS_END(d) (d == dend)
#define AT_WORD_BOUNDARY(d) \
(AT_STRINGS_BEG(d) || AT_STRINGS_END(d) || IS_A_LETTER(d - 1) != IS_A_LETTER(d))
@@ -3300,14 +3300,14 @@ re_match(bufp, string_arg, size, pos, regs)
case begline:
if (size == 0
- || d == string
+ || AT_STRINGS_BEG(d)
|| (d && d[-1] == '\n'))
break;
else
goto fail;
case endline:
- if (d == dend || *d == '\n')
+ if (AT_STRINGS_END(d) || *d == '\n')
break;
goto fail;
@@ -3604,7 +3604,7 @@ re_match(bufp, string_arg, size, pos, regs)
if (*p == 0xff) {
p++;
if (!--mcnt
- || d == dend
+ || AT_STRINGS_END(d)
|| (unsigned char)*d++ != (unsigned char)*p++)
goto fail;
continue;
@@ -3613,7 +3613,7 @@ re_match(bufp, string_arg, size, pos, regs)
if (c != (unsigned char)*p++
|| !--mcnt /* redundant check if pattern was
compiled properly. */
- || d == dend
+ || AT_STRINGS_END(d)
|| (unsigned char)*d++ != (unsigned char)*p++)
goto fail;
continue;