In perl.git, the branch blead has been updated <http://perl5.git.perl.org/perl.git/commitdiff/b6bb1ecbab2ac366ccb94da3406d2edf38553b42?hp=9927ab6ab90ba710ebd3b027dd97c9fb9cc97623>
- Log ----------------------------------------------------------------- commit b6bb1ecbab2ac366ccb94da3406d2edf38553b42 Author: Yves Orton <demer...@gmail.com> Date: Sat Jul 1 16:32:28 2017 +0200 hv.c: rename static function S_hfreeentries() to S_hv_free_entries() hfreeentries() reads very poorly - hv_free_entries() makes more sense too. M cpan/Devel-PPPort/parts/embed.fnc M embed.fnc M embed.h M hv.c M proto.h commit 2176e0e925bd2df99ec4eb1ef956d38d9ecb8a90 Author: Yves Orton <demer...@gmail.com> Date: Sat Jul 1 16:30:37 2017 +0200 fixup typo in comment M hv.c ----------------------------------------------------------------------- Summary of changes: cpan/Devel-PPPort/parts/embed.fnc | 2 +- embed.fnc | 2 +- embed.h | 2 +- hv.c | 12 ++++++------ proto.h | 6 +++--- 5 files changed, 12 insertions(+), 12 deletions(-) diff --git a/cpan/Devel-PPPort/parts/embed.fnc b/cpan/Devel-PPPort/parts/embed.fnc index a64ffbac74..1f347c2b83 100644 --- a/cpan/Devel-PPPort/parts/embed.fnc +++ b/cpan/Devel-PPPort/parts/embed.fnc @@ -1920,7 +1920,7 @@ po |SV* |hfree_next_entry |NN HV *hv|NN STRLEN *indexp #if defined(PERL_IN_HV_C) s |void |hsplit |NN HV *hv|STRLEN const oldsize|STRLEN newsize -s |void |hfreeentries |NN HV *hv +s |void |hv_free_entries |NN HV *hv s |SV* |hv_free_ent_ret|NN HV *hv|NN HE *entry sa |HE* |new_he sanR |HEK* |save_hek_flags |NN const char *str|I32 len|U32 hash|int flags diff --git a/embed.fnc b/embed.fnc index c8576af84a..ecc78662a7 100644 --- a/embed.fnc +++ b/embed.fnc @@ -2080,7 +2080,7 @@ po |SV* |hfree_next_entry |NN HV *hv|NN STRLEN *indexp #if defined(PERL_IN_HV_C) s |void |hsplit |NN HV *hv|STRLEN const oldsize|STRLEN newsize -s |void |hfreeentries |NN HV *hv +s |void |hv_free_entries|NN HV *hv s |SV* |hv_free_ent_ret|NN HV *hv|NN HE *entry sR |HE* |new_he sanR |HEK* |save_hek_flags |NN const char *str|I32 len|U32 hash|int flags diff --git a/embed.h b/embed.h index 7cc3bbe205..6490e6d7ef 100644 --- a/embed.h +++ b/embed.h @@ -1574,12 +1574,12 @@ # endif # if defined(PERL_IN_HV_C) #define clear_placeholders(a,b) S_clear_placeholders(aTHX_ a,b) -#define hfreeentries(a) S_hfreeentries(aTHX_ a) #define hsplit(a,b,c) S_hsplit(aTHX_ a,b,c) #define hv_auxinit(a) S_hv_auxinit(aTHX_ a) #define hv_auxinit_internal S_hv_auxinit_internal #define hv_delete_common(a,b,c,d,e,f,g) S_hv_delete_common(aTHX_ a,b,c,d,e,f,g) #define hv_free_ent_ret(a,b) S_hv_free_ent_ret(aTHX_ a,b) +#define hv_free_entries(a) S_hv_free_entries(aTHX_ a) #define hv_magic_check S_hv_magic_check #define hv_notallowed(a,b,c,d) S_hv_notallowed(aTHX_ a,b,c,d) #define new_he() S_new_he(aTHX) diff --git a/hv.c b/hv.c index f372728fe2..61f1f8f551 100644 --- a/hv.c +++ b/hv.c @@ -1754,7 +1754,7 @@ Perl_hv_clear(pTHX_ HV *hv) } } else { - hfreeentries(hv); + hv_free_entries(hv); HvPLACEHOLDERS_set(hv, 0); if (SvRMAGICAL(hv)) @@ -1851,7 +1851,7 @@ S_clear_placeholders(pTHX_ HV *hv, U32 items) } STATIC void -S_hfreeentries(pTHX_ HV *hv) +S_hv_free_entries(pTHX_ HV *hv) { STRLEN index = 0; XPVHV * const xhv = (XPVHV*)SvANY(hv); @@ -1866,7 +1866,7 @@ S_hfreeentries(pTHX_ HV *hv) /* hfree_next_entry() - * For use only by S_hfreeentries() and sv_clear(). + * For use only by S_hv_free_entries() and sv_clear(). * Delete the next available HE from hv and return the associated SV. * Returns null on empty hash. Nevertheless null is not a reliable * indicator that the hash is empty, as the deleted entry may have a @@ -1963,7 +1963,7 @@ Perl_hv_undef_flags(pTHX_ HV *hv, U32 flags) DEBUG_A(Perl_hv_assert(aTHX_ hv)); xhv = (XPVHV*)SvANY(hv); - /* The name must be deleted before the call to hfreeeeentries so that + /* The name must be deleted before the call to hv_free_entries so that CVs are anonymised properly. But the effective name must be pre- served until after that call (and only deleted afterwards if the call originated from sv_clear). For stashes with one name that is @@ -1971,7 +1971,7 @@ Perl_hv_undef_flags(pTHX_ HV *hv, U32 flags) allocate an array for storing the effective name. We can skip that during global destruction, as it does not matter where the CVs point if they will be freed anyway. */ - /* note that the code following prior to hfreeentries is duplicated + /* note that the code following prior to hv_free_entries is duplicated * in sv_clear(), and changes here should be done there too */ if (PL_phase != PERL_PHASE_DESTRUCT && HvNAME(hv)) { if (PL_stashcache) { @@ -1987,7 +1987,7 @@ Perl_hv_undef_flags(pTHX_ HV *hv, U32 flags) PL_tmps_stack[++PL_tmps_ix] = SvREFCNT_inc_simple_NN(hv); orig_ix = PL_tmps_ix; } - hfreeentries(hv); + hv_free_entries(hv); if (SvOOK(hv)) { struct mro_meta *meta; const char *name; diff --git a/proto.h b/proto.h index d9c8798498..d9ef91cd57 100644 --- a/proto.h +++ b/proto.h @@ -4537,9 +4537,6 @@ PERL_CALLCONV void Perl_sv_add_backref(pTHX_ SV *const tsv, SV *const sv); STATIC void S_clear_placeholders(pTHX_ HV *hv, U32 items); #define PERL_ARGS_ASSERT_CLEAR_PLACEHOLDERS \ assert(hv) -STATIC void S_hfreeentries(pTHX_ HV *hv); -#define PERL_ARGS_ASSERT_HFREEENTRIES \ - assert(hv) STATIC void S_hsplit(pTHX_ HV *hv, STRLEN const oldsize, STRLEN newsize); #define PERL_ARGS_ASSERT_HSPLIT \ assert(hv) @@ -4553,6 +4550,9 @@ STATIC SV* S_hv_delete_common(pTHX_ HV *hv, SV *keysv, const char *key, STRLEN k STATIC SV* S_hv_free_ent_ret(pTHX_ HV *hv, HE *entry); #define PERL_ARGS_ASSERT_HV_FREE_ENT_RET \ assert(hv); assert(entry) +STATIC void S_hv_free_entries(pTHX_ HV *hv); +#define PERL_ARGS_ASSERT_HV_FREE_ENTRIES \ + assert(hv) STATIC void S_hv_magic_check(HV *hv, bool *needs_copy, bool *needs_store); #define PERL_ARGS_ASSERT_HV_MAGIC_CHECK \ assert(hv); assert(needs_copy); assert(needs_store) -- Perl5 Master Repository