aboutsummaryrefslogtreecommitdiffstats
path: root/ext/strscan/strscan.c
diff options
context:
space:
mode:
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 2bf1a4faa2..41e08f6e16 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));
}
/*