const REGEXP * const rx = PM_GETRE(PL_curpm);
if (rx) {
const I32 paren = mg->mg_len;
- I32 s;
- I32 t;
+ SSize_t s;
+ SSize_t t;
if (paren < 0)
return 0;
if (paren <= (I32)RX_NPARENS(rx) &&
(s = RX_OFFS(rx)[paren].start) != -1 &&
(t = RX_OFFS(rx)[paren].end) != -1)
{
- I32 i;
+ SSize_t i;
if (mg->mg_obj) /* @+ */
i = t;
else /* @- */
i = s;
- if (i > 0 && RX_MATCH_UTF8(rx)) {
+ if (RX_MATCH_UTF8(rx)) {
const char * const b = RX_SUBBEG(rx);
if (b)
i = RX_SUBCOFFSET(rx) +
(U8*)(b-RX_SUBOFFSET(rx)+i));
}
- sv_setiv(sv, i);
+ sv_setuv(sv, i);
}
}
}
$Config{ptrsize} >= 8
or skip_all("Need 64-bit pointers for this test");
-plan(4);
+plan(5);
# [perl #116907]
# ${\2} to defeat constant folding, which in this case actually slows
pos $x = 2**31+3;
$x =~ /./g;
is "$'", 'efg', q "$' after match against long string";
+is "$-[0],$+[0]", '2147483651,2147483652',
+ '@- and @+ after matches past 2**31';