[Perl/perl5] 27618a: S_postincdec_common - check for GET magic before t...
[email protected] (Richard Leach via perl5-changes)
| Newsgroups | perl.perl5.changes |
|---|---|
| Message-ID | <Perl/perl5/push/refs/heads/blead/[email protected]> |
Branch: refs/heads/blead
Home: https://github.com/Perl/perl5
Commit: 27618acc0865f4cb19e7f85ef4d1e8bca6e63755
https://github.com/Perl/perl5/commit/27618acc0865f4cb19e7f85ef4d1e8bca6e63755
Author: Richard Leach <[email protected]>
Date: 2026-08-18 (Tue, 18 Aug 2026)
Changed paths:
M pp.c
Log Message:
-----------
S_postincdec_common - check for GET magic before testing SvROK(sv)
Commit: 1cda553c086d7a295eda91e69579126a8287f25c
https://github.com/Perl/perl5/commit/1cda553c086d7a295eda91e69579126a8287f25c
Author: Richard Leach <[email protected]>
Date: 2026-08-18 (Tue, 18 Aug 2026)
Changed paths:
M lib/integer.t
M opcode.h
M pp.c
M pp_hot.c
M pp_proto.h
M regen/opcode.pl
M t/op/inc.t
M t/op/int.t
Log Message:
-----------
use integer: Add missing postinc/preinc/postdec/predec OPs
This commit addresses a long standing ticket (RT #6021 / GH #3564).
When the `use integer` pragma is in effect, pre/post increment/decrement
operations will now follow the same sort of logic as the other integer
operators, and not convert IVs to NVs or UVs when `IV_MAX`/`IV_MIN`
thresholds are passed.
An example (64 bit, IV size 8) adapted from that ticket:
```
use integer;
my $foo = 0xffffffffffffffff;
print "$foo\n";
$foo -= 1;
print "$foo\n";
$foo = 0xffffffffffffffff;
$foo--;
print "$foo\n";
```
The subtraction and decrement operators used to produce different results:
```
18446744073709551615
-2
18446744073709551614
```
Now they produce identical results:
```
18446744073709551615
-2
-2
```
Commit: b1da2b65ff54ec2845281379eda52a2a6d5fa247
https://github.com/Perl/perl5/commit/b1da2b65ff54ec2845281379eda52a2a6d5fa247
Author: Richard Leach <[email protected]>
Date: 2026-08-18 (Tue, 18 Aug 2026)
Changed paths:
M t/op/inc.t
Log Message:
-----------
t/op/inc.t - add tests for 0+ overload
Commit: 2923ffa76331e9f6c2297c6563f7646e8b3acb52
https://github.com/Perl/perl5/commit/2923ffa76331e9f6c2297c6563f7646e8b3acb52
Author: Richard Leach <[email protected]>
Date: 2026-08-18 (Tue, 18 Aug 2026)
Changed paths:
M sv.c
M t/lib/overload_fallback.t
M t/op/inc.t
Log Message:
-----------
inc/dec operators handle 0+ overloading correctly
Compare: https://github.com/Perl/perl5/compare/e25d382dc080...2923ffa76331
To unsubscribe from these emails, change your notification settings at https://github.com/Perl/perl5/settings/notifications