diff options
author | Nicholas Clark <nick@ccl4.org> | 2005-05-25 14:06:55 +0000 |
---|---|---|
committer | Nicholas Clark <nick@ccl4.org> | 2005-05-25 14:06:55 +0000 |
commit | 4ba4de046b58ba69d5377ba3b48b04bbfd30638f (patch) | |
tree | ba1c433417faa12e1aab33f7e32d9e6f4669b916 | |
parent | 209b62a30de35b357c434b3ec3b38cb713369ba5 (diff) | |
download | perl-4ba4de046b58ba69d5377ba3b48b04bbfd30638f.tar.gz |
Replace all uses of HvNAME with the appropriate HvNAME_get or
HvNAME_set
p4raw-id: //depot/perl@24573
-rw-r--r-- | bytecode.pl | 2 | ||||
-rw-r--r-- | cop.h | 10 | ||||
-rw-r--r-- | ext/ByteLoader/bytecode.h | 2 | ||||
-rw-r--r-- | ext/ByteLoader/byterun.c | 2 |
4 files changed, 9 insertions, 7 deletions
diff --git a/bytecode.pl b/bytecode.pl index 1a090af983..bc527bb645 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 @@ -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 087e1511ad..a503627b21 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 7a8d378d50..065a0299d7 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 */ |