Don’t give unavailability warnings about our vars
authorFather Chrysostomos <sprout@cpan.org>
Sat, 24 Aug 2013 12:54:23 +0000 (05:54 -0700)
committerFather Chrysostomos <sprout@cpan.org>
Sat, 24 Aug 2013 13:28:56 +0000 (06:28 -0700)
commitf2047bf1d09481734b45bedab1675f6f7b8d6de1
tree6c9df49d5037b2b1d7a6a45e4c3af8df5b5fcd3e
parent9d8c432ff8966d6c9001edbc15582fff801b08b3
Don’t give unavailability warnings about our vars

Commit ce0d59fdd1c started using NULL to indicate nonexistent array
elements.  Since pads are AVs, they are filled with NULLs initially,
rather than &PL_sv_undef.

For ‘our’ vars, the pad entry is never actually touched.  Only one
piece of code was inspecting it, namely S_cv_clone_pad.  &PL_sv_undef
just happens to pass the checks that make sure the var is not stale.
However, we really should not be checking that at all if this is an
‘our’ var.

Even if we change ‘our’ vars back to having a &PL_sv_undef pad
entry, this fix should stay, as it makes the code clearer and makes
S_cv_clone_pad more robust.
pad.c
t/lib/warnings/pad