summaryrefslogtreecommitdiff
path: root/regcomp.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-06-30 02:08:54 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-06-30 02:08:54 +0000
commit23a32d6444cea5b1719edc42d63911e108d3086e (patch)
treeccbb65883a860cf72c3427345134b8edafe735c0 /regcomp.c
parent88ca298efbb004600e1853cef872038f78843252 (diff)
* include/ruby/oniguruma.h, include/ruby/re.h, re.c, regcomp.c,
regenc.c, regerror.c, regexec.c, regint.h, regparse.c: use long. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23907 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'regcomp.c')
-rw-r--r--regcomp.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/regcomp.c b/regcomp.c
index b8a0723d01..a7346d3d8e 100644
--- a/regcomp.c
+++ b/regcomp.c
@@ -52,7 +52,7 @@ static unsigned char PadBuf[WORD_ALIGNMENT_SIZE];
static UChar*
str_dup(UChar* s, UChar* end)
{
- int len = end - s;
+ ptrdiff_t len = end - s;
if (len > 0) {
UChar* r = (UChar* )xmalloc(len + 1);
@@ -73,7 +73,7 @@ swap_node(Node* a, Node* b)
if (NTYPE(a) == NT_STR) {
StrNode* sn = NSTR(a);
if (sn->capa == 0) {
- int len = sn->end - sn->s;
+ size_t len = sn->end - sn->s;
sn->s = sn->buf;
sn->end = sn->s + len;
}
@@ -82,7 +82,7 @@ swap_node(Node* a, Node* b)
if (NTYPE(b) == NT_STR) {
StrNode* sn = NSTR(b);
if (sn->capa == 0) {
- int len = sn->end - sn->s;
+ size_t len = sn->end - sn->s;
sn->s = sn->buf;
sn->end = sn->s + len;
}
@@ -416,7 +416,7 @@ compile_tree_n_times(Node* node, int n, regex_t* reg)
}
static int
-add_compile_string_length(UChar* s ARG_UNUSED, int mb_len, int str_len,
+add_compile_string_length(UChar* s ARG_UNUSED, int mb_len, OnigDistance str_len,
regex_t* reg ARG_UNUSED, int ignore_case)
{
int len;