summaryrefslogtreecommitdiff
path: root/regparse.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-06-30 02:08:54 (GMT)
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-06-30 02:08:54 (GMT)
commit23a32d6444cea5b1719edc42d63911e108d3086e (patch)
treeccbb65883a860cf72c3427345134b8edafe735c0 /regparse.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 'regparse.c')
-rw-r--r--regparse.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/regparse.c b/regparse.c
index 039e2d4..2a8f984 100644
--- a/regparse.c
+++ b/regparse.c
@@ -217,7 +217,7 @@ onig_strncmp(const UChar* s1, const UChar* s2, int n)
extern void
onig_strcpy(UChar* dest, const UChar* src, const UChar* end)
{
- int len = end - src;
+ ptrdiff_t len = end - src;
if (len > 0) {
xmemcpy(dest, src, len);
dest[len] = (UChar )0;
@@ -228,7 +228,8 @@ onig_strcpy(UChar* dest, const UChar* src, const UChar* end)
static UChar*
strdup_with_null(OnigEncoding enc, UChar* s, UChar* end)
{
- int slen, term_len, i;
+ ptrdiff_t slen;
+ int term_len, i;
UChar *r;
slen = end - s;
@@ -389,7 +390,7 @@ onig_st_insert_strend(hash_table_type* table, const UChar* str_key,
typedef struct {
UChar* name;
- int name_len; /* byte length */
+ size_t name_len; /* byte length */
int back_num; /* number of backrefs */
int back_alloc;
int back_ref1;
@@ -1413,10 +1414,10 @@ node_new_option(OnigOptionType option)
extern int
onig_node_str_cat(Node* node, const UChar* s, const UChar* end)
{
- int addlen = end - s;
+ ptrdiff_t addlen = end - s;
if (addlen > 0) {
- int len = NSTR(node)->end - NSTR(node)->s;
+ ptrdiff_t len = NSTR(node)->end - NSTR(node)->s;
if (NSTR(node)->capa > 0 || (len + addlen > NODE_STR_BUF_SIZE - 1)) {
UChar* p;