extern regexp* my_regdupe (pTHX_ const regexp *r, CLONE_PARAMS *param);
#endif
-EXTERN_C const struct regexp_engine my_reg_engine = {
+EXTERN_C const struct regexp_engine my_reg_engine;
+
+END_EXTERN_C
+
+const struct regexp_engine my_reg_engine = {
my_regcomp,
my_regexec,
my_re_intuit_start,
#endif
};
-END_EXTERN_C
-
MODULE = re PACKAGE = re
void
#define PerlSIO_set_cnt(f,c) PerlIOProc_abort()
#endif
#if defined(USE_STDIO_PTR) && defined(STDIO_PTR_LVALUE)
-#define PerlSIO_set_ptr(f,p) FILE_ptr(f) = (p)
+#define PerlSIO_set_ptr(f,p) FILE_ptr(f) = ((STDCHAR*)(p))
#else
#define PerlSIO_set_ptr(f,p) PerlIOProc_abort()
#endif
&& !SvROK(TARG)) /* Cannot trust since INTUIT cannot guess ^ */
goto yup;
}
- if (CALLREGEXEC(rx, (char*)s, (char *)strend, (char*)truebase, minmatch, TARG, (void*)gpos, r_flags))
+ if (CALLREGEXEC(rx, (char*)s, (char *)strend, (char*)truebase, minmatch, TARG, INT2PTR(void*, gpos), r_flags))
{
PL_curpm = pm;
if (dynpm->op_pmflags & PMf_ONCE)
}
if (rx->startp[0] != -1) {
mg->mg_len = rx->endp[0];
- if (rx->startp[0] + rx->gofs == rx->endp[0])
+ if (rx->startp[0] + rx->gofs == (UV)rx->endp[0])
mg->mg_flags |= MGf_MINMATCH;
else
mg->mg_flags &= ~MGf_MINMATCH;
}
}
had_zerolen = (rx->startp[0] != -1
- && rx->startp[0] + rx->gofs == rx->endp[0]);
+ && rx->startp[0] + rx->gofs == (UV)rx->endp[0]);
PUTBACK; /* EVAL blocks may use stack */
r_flags |= REXEC_IGNOREPOS | REXEC_NOT_FIRST;
goto play_it_again;
}
if (rx->startp[0] != -1) {
mg->mg_len = rx->endp[0];
- if (rx->startp[0] + rx->gofs == rx->endp[0])
+ if (rx->startp[0] + rx->gofs == (UV)rx->endp[0])
mg->mg_flags |= MGf_MINMATCH;
else
mg->mg_flags &= ~MGf_MINMATCH;
the "real" pattern. */
DEBUG_OPTIMISE_r({
PerlIO_printf(Perl_debug_log,"minlen: %"IVdf" r->minlen:%"IVdf"\n",
- minlen, r->minlen);
+ (IV)minlen, (IV)r->minlen);
});
r->minlenret = minlen;
if (r->minlen < minlen)
SV * const mysv_val=sv_newmortal();
DEBUG_PARSE_MSG("");
regprop(RExC_rx, mysv_val, val);
- PerlIO_printf(Perl_debug_log, "~ attach to %s (%d) offset to %d\n",
- SvPV_nolen_const(mysv_val),
- REG_NODE_NUM(val),
- val - scan
+ PerlIO_printf(Perl_debug_log, "~ attach to %s (%"IVdf") offset to %"IVdf"\n",
+ SvPV_nolen_const(mysv_val),
+ (IV)REG_NODE_NUM(val),
+ (IV)(val - scan)
);
});
if (reg_off_by_arg[OP(scan)]) {
PerlIO_putc(Perl_debug_log, ' ');
}
if (r->extflags & RXf_GPOS_SEEN)
- PerlIO_printf(Perl_debug_log, "GPOS:%"UVuf" ", r->gofs);
+ PerlIO_printf(Perl_debug_log, "GPOS:%"UVuf" ", (UV)r->gofs);
if (r->intflags & PREGf_SKIP)
PerlIO_printf(Perl_debug_log, "plus ");
if (r->intflags & PREGf_IMPLICIT)
PerlIO_printf(Perl_debug_log, "implicit ");
- PerlIO_printf(Perl_debug_log, "minlen %ld ", (long) r->minlen);
+ PerlIO_printf(Perl_debug_log, "minlen %"IVdf" ", (IV)r->minlen);
if (r->extflags & RXf_EVAL_SEEN)
PerlIO_printf(Perl_debug_log, "with eval ");
PerlIO_printf(Perl_debug_log, "\n");
#define CLEAR_OPTSTART \
if (optstart) STMT_START { \
- DEBUG_OPTIMISE_r(PerlIO_printf(Perl_debug_log, " (%d nodes)\n", node - optstart)); \
+ DEBUG_OPTIMISE_r(PerlIO_printf(Perl_debug_log, " (%"IVdf" nodes)\n", (IV)(node - optstart))); \
optstart=NULL; \
} STMT_END
);
if (trie->jump) {
U16 dist= trie->jump[word_idx+1];
- PerlIO_printf(Perl_debug_log, "(%u)\n",
- (dist ? this_trie + dist : next) - start);
+ PerlIO_printf(Perl_debug_log, "(%"UVuf")\n",
+ (UV)((dist ? this_trie + dist : next) - start));
if (dist) {
if (!nextbranch)
nextbranch= this_trie + trie->jump[0];
}
CLEAR_OPTSTART;
#ifdef DEBUG_DUMPUNTIL
- PerlIO_printf(Perl_debug_log, "--- %d\n",indent);
+ PerlIO_printf(Perl_debug_log, "--- %d\n", (int)indent);
#endif
return node;
}
}
DEBUG_EXECUTE_r( if (ml_anch)
PerlIO_printf(Perl_debug_log, "Position at offset %ld does not contradict /%s^%s/m...\n",
- (long)(strpos - i_strpos), PL_colors[0], PL_colors[1]);
+ (long)(strpos - i_strpos), PL_colors[0], PL_colors[1]);
);
success_at_start:
if (!(prog->intflags & PREGf_NAUGHTY) /* XXXX If strpos moved? */
else
endpos= strend;
- DEBUG_EXECUTE_r(PerlIO_printf(Perl_debug_log, "start_shift: %"IVdf" check_at: %d s: %d endpos: %d\n",
- (IV)start_shift, check_at - strbeg, s - strbeg, endpos - strbeg));
+ DEBUG_EXECUTE_r(PerlIO_printf(Perl_debug_log, "start_shift: %"IVdf" check_at: %"IVdf" s: %"IVdf" endpos: %"IVdf"\n",
+ (IV)start_shift, (IV)(check_at - strbeg), (IV)(s - strbeg), (IV)(endpos - strbeg)));
t = s;
s = find_byclass(prog, progi->regstclass, s, endpos, NULL);
s = (char*)leftmost;
DEBUG_TRIE_EXECUTE_r({
PerlIO_printf(
- Perl_debug_log,"Matches word #%"UVxf" at position %d. Trying full pattern...\n",
- (UV)accepted_word, s - real_start
+ Perl_debug_log,"Matches word #%"UVxf" at position %"IVdf". Trying full pattern...\n",
+ (UV)accepted_word, (IV)(s - real_start)
);
});
if (!reginfo || regtry(reginfo, &s)) {
}
}
else if (data) {
- reginfo.ganch = strbeg + (UV)data;
+ reginfo.ganch = strbeg + PTR2UV(data);
} else /* pos() not defined */
reginfo.ganch = strbeg;
}