This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
pp_av2arylen(): rename var from 'sv' to svp'
authorDavid Mitchell <davem@iabyn.com>
Fri, 17 Oct 2014 13:29:33 +0000 (14:29 +0100)
committerDavid Mitchell <davem@iabyn.com>
Mon, 20 Oct 2014 09:16:56 +0000 (10:16 +0100)
Conventionally we name variables of type 'SV**' svp rather than sv.
Calling the var 'sv' in this small function initially confused me,
so rename it.

pp.c

diff --git a/pp.c b/pp.c
index 67dc770..250e966 100644 (file)
--- a/pp.c
+++ b/pp.c
@@ -418,12 +418,12 @@ PP(pp_av2arylen)
     AV * const av = MUTABLE_AV(TOPs);
     const I32 lvalue = PL_op->op_flags & OPf_MOD || LVRET;
     if (lvalue) {
-       SV ** const sv = Perl_av_arylen_p(aTHX_ MUTABLE_AV(av));
-       if (!*sv) {
-           *sv = newSV_type(SVt_PVMG);
-           sv_magic(*sv, MUTABLE_SV(av), PERL_MAGIC_arylen, NULL, 0);
+       SV ** const svp = Perl_av_arylen_p(aTHX_ MUTABLE_AV(av));
+       if (!*svp) {
+           *svp = newSV_type(SVt_PVMG);
+           sv_magic(*svp, MUTABLE_SV(av), PERL_MAGIC_arylen, NULL, 0);
        }
-       SETs(*sv);
+       SETs(*svp);
     } else {
        SETs(sv_2mortal(newSViv(AvFILL(MUTABLE_AV(av)))));
     }