In perl.git, the branch blead has been updated

<http://perl5.git.perl.org/perl.git/commitdiff/dc4b20bdf34f180d3017bda09b1fd225ad2b19d4?hp=cc3315ba158429a67e76ae0034535e9783abe8cf>

- Log -----------------------------------------------------------------
commit dc4b20bdf34f180d3017bda09b1fd225ad2b19d4
Author: Craig A. Berry <[email protected]>
Date:   Fri Aug 17 11:05:14 2012 -0500

    newCONSTSUB needs its own CV.
    
    It had been using one called simply C<cv> but that name is already
    taken in the (opaque) argument list generated by the XS_EUPXS
    wrapper around the function name.  And that cv is actually used
    by boilerplate code generated from PPCODE, but only when there is
    an ALIAS section present, which there wasn't before c0810f8ef84,
    but now is.
    
    So declare and use our own CV and leave the one passed in alone.
-----------------------------------------------------------------------

Summary of changes:
 ext/XS-APItest/APItest.xs |   10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/ext/XS-APItest/APItest.xs b/ext/XS-APItest/APItest.xs
index 0979aee..ffe0c43 100644
--- a/ext/XS-APItest/APItest.xs
+++ b/ext/XS-APItest/APItest.xs
@@ -1965,23 +1965,23 @@ newCONSTSUB(stash, name, flags, sv)
     ALIAS:
        newCONSTSUB_flags = 1
     PREINIT:
-       CV* cv;
+       CV* mycv;
        STRLEN len;
        const char *pv = SvPV(name, len);
     PPCODE:
         switch (ix) {
            case 0:
-              cv = newCONSTSUB(stash, pv, SvOK(sv) ? SvREFCNT_inc(sv) : NULL);
+               mycv = newCONSTSUB(stash, pv, SvOK(sv) ? SvREFCNT_inc(sv) : 
NULL);
                break;
            case 1:
-               cv = newCONSTSUB_flags(
+               mycv = newCONSTSUB_flags(
                  stash, pv, len, flags | SvUTF8(name), SvOK(sv) ? 
SvREFCNT_inc(sv) : NULL
                );
                break;
         }
         EXTEND(SP, 2);
-        PUSHs( CvCONST(cv) ? &PL_sv_yes : &PL_sv_no );
-       PUSHs((SV*)CvGV(cv));
+        PUSHs( CvCONST(mycv) ? &PL_sv_yes : &PL_sv_no );
+        PUSHs((SV*)CvGV(mycv));
 
 void
 gv_init_type(namesv, multi, flags, type)

--
Perl5 Master Repository

Reply via email to