summaryrefslogtreecommitdiff
path: root/regex.c
diff options
context:
space:
mode:
authorknu <knu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-02-27 11:51:55 +0000
committerknu <knu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-02-27 11:51:55 +0000
commit9369118f8f4ed02c76839c6a67c268a2de9acde9 (patch)
tree1c5e7235b590e1431f70ab743b4ac7314c7a0d81 /regex.c
parentb7111d382c16ee89dae3c19c756ce2272190d55a (diff)
Merge changes between r11871 and r11907 from ruby_1_8.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8_6@11908 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'regex.c')
-rw-r--r--regex.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/regex.c b/regex.c
index ae0694b764..fa04871c1b 100644
--- a/regex.c
+++ b/regex.c
@@ -1014,8 +1014,8 @@ calculate_must_string(start, end)
{
int mcnt;
int max = 0;
- unsigned char *p = start;
- unsigned char *pend = end;
+ unsigned char *p = (unsigned char *)start;
+ unsigned char *pend = (unsigned char *)end;
char *must = 0;
if (start == NULL) return 0;
@@ -1029,7 +1029,7 @@ calculate_must_string(start, end)
case exactn:
mcnt = *p;
if (mcnt > max) {
- must = p;
+ must = (char *)p;
max = mcnt;
}
p += mcnt+1;
@@ -2689,7 +2689,7 @@ slow_search(little, llen, big, blen, translate)
}
}
- if (slow_match(little, little+llen, big, bend, translate))
+ if (slow_match(little, little+llen, big, bend, (unsigned char *)translate))
return big - bsave;
big+=mbclen(*big);
@@ -3222,13 +3222,13 @@ re_search(bufp, string, size, startpos, range, regs)
}
pend = size;
if (bufp->options & RE_OPTIMIZE_NO_BM) {
- pos = slow_search(bufp->must+1, len,
- string+pbeg, pend-pbeg,
- MAY_TRANSLATE()?translate:0);
+ pos = slow_search((unsigned char *)(bufp->must+1), len,
+ (unsigned char*)(string+pbeg), pend-pbeg,
+ (char *)(MAY_TRANSLATE()?translate:0));
}
else {
- pos = bm_search(bufp->must+1, len,
- string+pbeg, pend-pbeg,
+ pos = bm_search((unsigned char *)(bufp->must+1), len,
+ (unsigned char *)(string+pbeg), pend-pbeg,
bufp->must_skip,
MAY_TRANSLATE()?translate:0);
}