/* currently converts input to bytes if possible, but doesn't sweat failure */
UV
-Perl_do_vecget(pTHX_ SV *sv, I32 offset, I32 size)
+Perl_do_vecget(pTHX_ SV *sv, SSize_t offset, int size)
{
dVAR;
STRLEN srclen, len, uoffset, bitoffs = 0;
Perl_do_vecset(pTHX_ SV *sv)
{
dVAR;
- register I32 offset, bitoffs = 0;
- register I32 size;
+ register SSize_t offset, bitoffs = 0;
+ register int size;
register unsigned char *s;
register UV lval;
I32 mask;
: Defined in doop.c, used only in pp.c
p |I32 |do_trans |NN SV* sv
: Used in my.c and pp.c
-p |UV |do_vecget |NN SV* sv|I32 offset|I32 size
+p |UV |do_vecget |NN SV* sv|SSize_t offset|int size
: Defined in doop.c, used only in mg.c (with /* XXX slurp this routine */)
p |void |do_vecset |NN SV* sv
: Defined in doop.c, used only in pp.c
#define PERL_ARGS_ASSERT_DO_TRANS \
assert(sv)
-PERL_CALLCONV UV Perl_do_vecget(pTHX_ SV* sv, I32 offset, I32 size)
+PERL_CALLCONV UV Perl_do_vecget(pTHX_ SV* sv, SSize_t offset, int size)
__attribute__nonnull__(pTHX_1);
#define PERL_ARGS_ASSERT_DO_VECGET \
assert(sv)
plan(7);
# RT #111730: Negative offset to vec in lvalue context
-local $::TODO = "RT #111730 - vec uses I32 for offsets";
my $v = "";
ok(scalar eval { vec($v, 0x80000000, 1) = 1 }, "set a bit at a large offset");
ok(vec($v, 0x80000000, 1), "check a bit at a large offset");
-{ local $::TODO; # succeeds but shouldn't at this point
+
ok(scalar eval { vec($v, 0x100000000, 1) = 1 },
"set a bit at a larger offset");
ok(vec($v, 0x100000000, 1), "check a bit at a larger offset");
# real out of range values
ok(!eval { vec($v, -0x80000000, 1) = 1 },
"shouldn't be able to set at a large negative offset");
-}
ok(!eval { vec($v, -0x100000000, 1) = 1 },
"shouldn't be able to set at a larger negative offset");