diff options
author | Craig A. Berry <craigberry@mac.com> | 2012-08-17 11:05:14 -0500 |
---|---|---|
committer | Craig A. Berry <craigberry@mac.com> | 2012-08-17 11:15:05 -0500 |
commit | dc4b20bdf34f180d3017bda09b1fd225ad2b19d4 (patch) | |
tree | d27ca1d08a9a3cdfed9504018da82eb74a218318 | |
parent | cc3315ba158429a67e76ae0034535e9783abe8cf (diff) | |
download | perl-dc4b20bdf34f180d3017bda09b1fd225ad2b19d4.tar.gz |
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.
-rw-r--r-- | 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 0979aee231..ffe0c43a68 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) |