summaryrefslogtreecommitdiff
path: root/ext/strscan/strscan.c
diff options
context:
space:
mode:
authornaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-03-25 06:46:57 +0000
committernaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-03-25 06:46:57 +0000
commit6b1cf264a80f2efe6a4b42553b8bf2e16f51690a (patch)
treede2cec1bac93bf9b8a5807f7da3a21c04756f19c /ext/strscan/strscan.c
parente3c3733a30091958cb00bc1a2e4f0882fe6d59d6 (diff)
* ext/sdbm/_sdbm.c (sdbm_open): use size_t.
* ext/syck/bytecode.c: ditto. * ext/sdbm/_sdbm.c (delpair): use ptrdiff_t. * ext/sdbm/init.c: use RSTRING_LENINT. * ext/dl/handle.c: suppress warning: shorten-64-to-32. * ext/strscan/strscan.c: ditto. * ext/syck/emitter.c: ditto. * ext/syck/implicit.c: ditto. * ext/syck/syck.c: ditto. * ext/syck/token.c: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31176 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/strscan/strscan.c')
-rw-r--r--ext/strscan/strscan.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/ext/strscan/strscan.c b/ext/strscan/strscan.c
index 2bf1a4f..41e08f6 100644
--- a/ext/strscan/strscan.c
+++ b/ext/strscan/strscan.c
@@ -405,7 +405,7 @@ strscan_do_scan(VALUE self, VALUE regex, int succptr, int getstr, int headonly)
regex_t *rb_reg_prepare_re(VALUE re, VALUE str);
struct strscanner *p;
regex_t *re;
- int ret;
+ long ret;
int tmpreg;
Check_Type(regex, T_REGEXP);
@@ -655,7 +655,7 @@ static void
adjust_registers_to_matched(struct strscanner *p)
{
onig_region_clear(&(p->regs));
- onig_region_set(&(p->regs), 0, 0, p->curr - p->prev);
+ onig_region_set(&(p->regs), 0, 0, (int)(p->curr - p->prev));
}
/*