From 4d00dfae3cb125595c5230962f5b243f5a096dde Mon Sep 17 00:00:00 2001 From: Yves Orton Date: Wed, 19 Oct 2016 11:14:26 +0200 Subject: mro_core.c: use new SvPVCLEAR and constant string friendly macros --- mro_core.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'mro_core.c') diff --git a/mro_core.c b/mro_core.c index d4ca7f2be1..809bcdf514 100644 --- a/mro_core.c +++ b/mro_core.c @@ -346,7 +346,7 @@ S_mro_get_linear_isa_dfs(pTHX_ HV *stash, U32 level) /* They have no stash. So create ourselves an ->isa cache as if we'd copied it from what theirs should be. */ stored = MUTABLE_HV(sv_2mortal(MUTABLE_SV(newHV()))); - (void) hv_store(stored, "UNIVERSAL", 9, &PL_sv_undef, 0); + (void) hv_stores(stored, "UNIVERSAL", &PL_sv_undef); av_push(retval, newSVhek(HeKEY_hek(hv_store_ent(stored, sv, &PL_sv_undef, 0)))); @@ -356,7 +356,7 @@ S_mro_get_linear_isa_dfs(pTHX_ HV *stash, U32 level) } else { /* We have no parents. */ stored = MUTABLE_HV(sv_2mortal(MUTABLE_SV(newHV()))); - (void) hv_store(stored, "UNIVERSAL", 9, &PL_sv_undef, 0); + (void) hv_stores(stored, "UNIVERSAL", &PL_sv_undef); } (void) hv_store_ent(stored, our_name, &PL_sv_undef, 0); @@ -451,7 +451,7 @@ Perl_mro_get_linear_isa(pTHX_ HV *stash) HEK_LEN(canon_name), HEK_FLAGS(canon_name), HV_FETCH_ISSTORE, &PL_sv_undef, HEK_HASH(canon_name)); - (void) hv_store(isa_hash, "UNIVERSAL", 9, &PL_sv_undef, 0); + (void) hv_stores(isa_hash, "UNIVERSAL", &PL_sv_undef); SvREADONLY_on(isa_hash); @@ -524,8 +524,8 @@ Perl_mro_isa_changed_in(pTHX_ HV* stash) svp = hv_fetchhek(PL_isarev, stashhek, 0); isarev = svp ? MUTABLE_HV(*svp) : NULL; - if((stashname_len == 9 && strEQ(stashname, "UNIVERSAL")) - || (isarev && hv_exists(isarev, "UNIVERSAL", 9))) { + if((memEQs(stashname, stashname_len, "UNIVERSAL")) + || (isarev && hv_existss(isarev, "UNIVERSAL"))) { PL_sub_generation++; is_universal = TRUE; } @@ -1329,8 +1329,8 @@ Perl_mro_method_changed_in(pTHX_ HV *stash) /* If stash is UNIVERSAL, or one of UNIVERSAL's parents, invalidate all method caches globally */ - if((stashname_len == 9 && strEQ(stashname, "UNIVERSAL")) - || (isarev && hv_exists(isarev, "UNIVERSAL", 9))) { + if((memEQs(stashname, stashname_len, "UNIVERSAL")) + || (isarev && hv_existss(isarev, "UNIVERSAL"))) { PL_sub_generation++; return; } -- cgit v1.2.1