This is a live mirror of the Perl 5 development currently hosted at
https://github.com/perl/perl5
https://perl5.git.perl.org
/
perl5.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a1031b5
)
B.xs: silence clang warning
author
David Mitchell
<davem@iabyn.com>
Thu, 13 Dec 2012 13:24:58 +0000
(13:24 +0000)
committer
David Mitchell
<davem@iabyn.com>
Thu, 13 Dec 2012 14:19:35 +0000
(14:19 +0000)
PADOFFSET is unsigned, so checking that it's >= 0 is pointless.
ext/B/B.xs
patch
|
blob
|
blame
|
history
diff --git
a/ext/B/B.xs
b/ext/B/B.xs
index
1a6e257
..
bf7e9b1
100644
(file)
--- a/
ext/B/B.xs
+++ b/
ext/B/B.xs
@@
-1942,7
+1942,7
@@
PadlistARRAYelt(padlist, idx)
B::PADLIST padlist
PADOFFSET idx
PPCODE:
- if (
idx >= 0 &&
PadlistMAX(padlist) >= 0
+ if (PadlistMAX(padlist) >= 0
&& idx <= PadlistMAX(padlist))
XPUSHs(make_sv_object(aTHX_
(SV *)PadlistARRAY(padlist)[idx]));