From: Nicholas Clark Date: Wed, 25 May 2005 14:06:55 +0000 (+0000) Subject: Replace all uses of HvNAME with the appropriate HvNAME_get or X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=4ba4de046b58ba69d5377ba3b48b04bbfd30638f;p=p5sagit%2Fp5-mst-13.2.git Replace all uses of HvNAME with the appropriate HvNAME_get or HvNAME_set p4raw-id: //depot/perl@24573 --- diff --git a/bytecode.pl b/bytecode.pl index 1a090af..bc527bb 100644 --- a/bytecode.pl +++ b/bytecode.pl @@ -425,7 +425,7 @@ av_push bstate->bs_sv svindex x xav_fill AvFILLp(bstate->bs_sv) SSize_t xav_max AvMAX(bstate->bs_sv) SSize_t xhv_riter HvRITER(bstate->bs_sv) I32 -xhv_name HvNAME(bstate->bs_sv) pvindex +xhv_name bstate->bs_sv pvindex x hv_store bstate->bs_sv svindex x sv_magic bstate->bs_sv char x mg_obj SvMAGIC(bstate->bs_sv)->mg_obj svindex diff --git a/cop.h b/cop.h index cffc309..b6f900c 100644 --- a/cop.h +++ b/cop.h @@ -177,11 +177,11 @@ struct cop { # define CopSTASH(c) (CopSTASHPV(c) \ ? gv_stashpv(CopSTASHPV(c),GV_ADD) : Nullhv) -# define CopSTASH_set(c,hv) CopSTASHPV_set(c, (hv) ? HvNAME(hv) : Nullch) +# define CopSTASH_set(c,hv) CopSTASHPV_set(c, (hv) ? HvNAME_get(hv) : Nullch) # define CopSTASH_eq(c,hv) ((hv) \ - && (CopSTASHPV(c) == HvNAME(hv) \ - || (CopSTASHPV(c) && HvNAME(hv) \ - && strEQ(CopSTASHPV(c), HvNAME(hv))))) + && (CopSTASHPV(c) == HvNAME_get(hv) \ + || (CopSTASHPV(c) && HvNAME_get(hv)\ + && strEQ(CopSTASHPV(c), HvNAME_get(hv))))) # ifdef NETWARE # define CopSTASH_free(c) SAVECOPSTASH_FREE(c) # else @@ -202,7 +202,7 @@ struct cop { # define CopFILE(c) (CopFILESV(c) ? SvPVX(CopFILESV(c)) : Nullch) # define CopSTASH(c) ((c)->cop_stash) # define CopSTASH_set(c,hv) ((c)->cop_stash = (hv)) -# define CopSTASHPV(c) (CopSTASH(c) ? HvNAME(CopSTASH(c)) : Nullch) +# define CopSTASHPV(c) (CopSTASH(c) ? HvNAME_get(CopSTASH(c)) : Nullch) /* cop_stash is not refcounted */ # define CopSTASHPV_set(c,pv) CopSTASH_set((c), gv_stashpv(pv,GV_ADD)) # define CopSTASH_eq(c,hv) (CopSTASH(c) == (hv)) diff --git a/ext/ByteLoader/bytecode.h b/ext/ByteLoader/bytecode.h index 087e151..a503627 100644 --- a/ext/ByteLoader/bytecode.h +++ b/ext/ByteLoader/bytecode.h @@ -347,6 +347,8 @@ typedef char *pvindex; mg_set(*hv_store(GvHV(gv_fetchpv("SIG", TRUE, SVt_PVHV)), \ name, strlen(name), cv, 0)) +#define BSET_xhv_name(hv, name) Perl_hv_name_set(aTHX_ hv, name, strlen(name), 0) + /* NOTE: the bytecode header only sanity-checks the bytecode. If a script cares about * what version of Perl it's being called under, it should do a 'use 5.006_001' or * equivalent. However, since the header includes checks requiring an exact match in diff --git a/ext/ByteLoader/byterun.c b/ext/ByteLoader/byterun.c index 7a8d378..065a029 100644 --- a/ext/ByteLoader/byterun.c +++ b/ext/ByteLoader/byterun.c @@ -524,7 +524,7 @@ byterun(pTHX_ register struct byteloader_state *bstate) { pvindex arg; BGET_pvindex(arg); - HvNAME(bstate->bs_sv) = arg; + BSET_xhv_name(bstate->bs_sv, arg); break; } case INSN_HV_STORE: /* 67 */