projects
/
platform
/
upstream
/
perl.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a02a540
)
sv_dec is supposed to go *down*, m'kay.
author
Nicholas Clark
<nick@ccl4.org>
Sat, 9 Jul 2005 15:44:17 +0000
(15:44 +0000)
committer
Nicholas Clark
<nick@ccl4.org>
Sat, 9 Jul 2005 15:44:17 +0000
(15:44 +0000)
p4raw-id: //depot/perl@25102
sv.c
patch
|
blob
|
history
t/op/inc.t
patch
|
blob
|
history
diff --git
a/sv.c
b/sv.c
index
268cb3a
..
99e456e
100644
(file)
--- a/
sv.c
+++ b/
sv.c
@@
-7067,7
+7067,7
@@
Perl_sv_dec(pTHX_ register SV *sv)
}
else {
(void)SvIOK_only_UV(sv);
- SvUV_set(sv, SvUVX(sv)
+
1);
+ SvUV_set(sv, SvUVX(sv)
-
1);
}
} else {
if (SvIVX(sv) == IV_MIN)
diff --git
a/t/op/inc.t
b/t/op/inc.t
index
156ca92
..
5f05642
100755
(executable)
--- a/
t/op/inc.t
+++ b/
t/op/inc.t
@@
-2,7
+2,7
@@
# use strict;
-print "1..3
0
\n";
+print "1..3
2
\n";
my $test = 1;
@@
-176,3
+176,12
@@
check_same (\%orig, \%postdec);
ok($p == -1, $p);
ok($@ eq '', $@);
}
+
+$a = 2147483648;
+$c=--$a;
+ok ($a == 2147483647, $a);
+
+
+$a = 2147483648;
+$c=$a--;
+ok ($a == 2147483647, $a);