diff options
author | Nicholas Clark <nick@ccl4.org> | 2005-06-08 16:02:54 +0000 |
---|---|---|
committer | Nicholas Clark <nick@ccl4.org> | 2005-06-08 16:02:54 +0000 |
commit | 01b8bcb77a033a072e6afd95c46cef74d30628c1 (patch) | |
tree | 7ebc9cf04300d652126af3bdb51e2c28e8e9884e /mg.c | |
parent | 8b6b16e72bf4dd30bd09781ad50e9f66fd94440b (diff) | |
download | perl-01b8bcb77a033a072e6afd95c46cef74d30628c1.tar.gz |
Add and use MgPV_nolen_const
p4raw-id: //depot/perl@24761
Diffstat (limited to 'mg.c')
-rw-r--r-- | mg.c | 12 |
1 files changed, 4 insertions, 8 deletions
@@ -1027,9 +1027,8 @@ Perl_magic_setenv(pTHX_ SV *sv, MAGIC *mg) int Perl_magic_clearenv(pTHX_ SV *sv, MAGIC *mg) { - STRLEN n_a; (void)sv; - my_setenv(MgPV(mg,n_a),Nullch); + my_setenv(MgPV_nolen_const(mg),Nullch); return 0; } @@ -1107,9 +1106,8 @@ int Perl_magic_getsig(pTHX_ SV *sv, MAGIC *mg) { I32 i; - STRLEN n_a; /* Are we fetching a signal entry? */ - i = whichsig(MgPV(mg,n_a)); + i = whichsig(MgPV_nolen_const(mg)); if (i > 0) { if(PL_psig_ptr[i]) sv_setsv(sv,PL_psig_ptr[i]); @@ -1140,8 +1138,7 @@ Perl_magic_clearsig(pTHX_ SV *sv, MAGIC *mg) * refactoring might be in order. */ dVAR; - STRLEN n_a; - register const char *s = MgPV(mg,n_a); + register const char *s = MgPV_nolen_const(mg); (void)sv; if (*s == '_') { SV** svp = 0; @@ -1633,12 +1630,11 @@ Perl_magic_setdbline(pTHX_ SV *sv, MAGIC *mg) I32 i; GV* gv; SV** svp; - STRLEN n_a; gv = PL_DBline; i = SvTRUE(sv); svp = av_fetch(GvAV(gv), - atoi(MgPV(mg,n_a)), FALSE); + atoi(MgPV_nolen_const(mg)), FALSE); if (svp && SvIOKp(*svp) && (o = INT2PTR(OP*,SvIVX(*svp)))) { /* set or clear breakpoint in the relevant control op */ if (i) |