In perl.git, the branch blead has been updated <http://perl5.git.perl.org/perl.git/commitdiff/010434d45e3a798ee8ecbc1df77c8e1cafc561ab?hp=c553cca00d719f5fcdff702b67da6044ef5a0601>
- Log ----------------------------------------------------------------- commit 010434d45e3a798ee8ecbc1df77c8e1cafc561ab Author: Nicholas Clark <[email protected]> Date: Fri Oct 22 19:59:36 2010 +0200 For PROXYSUBS, get the hash from the fetch to pass to the subsequent store. This saves the store having to (re)compute the hash. ----------------------------------------------------------------------- Summary of changes: .../lib/ExtUtils/Constant/ProxySubs.pm | 25 +++++++++++++------ 1 files changed, 17 insertions(+), 8 deletions(-) diff --git a/cpan/ExtUtils-Constant/lib/ExtUtils/Constant/ProxySubs.pm b/cpan/ExtUtils-Constant/lib/ExtUtils/Constant/ProxySubs.pm index 0038831..d9eca8b 100644 --- a/cpan/ExtUtils-Constant/lib/ExtUtils/Constant/ProxySubs.pm +++ b/cpan/ExtUtils-Constant/lib/ExtUtils/Constant/ProxySubs.pm @@ -448,17 +448,24 @@ EOBOOT EXPLODE /* Need to add prototypes, else parsing will vary by platform. */ - SV **sv = hv_fetch(symbol_table, value_for_notfound->name, - value_for_notfound->namelen, TRUE); - if (!sv) { + HE *he = (HE*) hv_common_key_len(symbol_table, + value_for_notfound->name, + value_for_notfound->namelen, + HV_FETCH_LVALUE, NULL, 0); + SV *sv; +#ifndef SYMBIAN + HEK *hek; +#endif + if (!he) { Perl_croak($athx "Couldn't add key '%s' to %%$package_sprintf_safe\::", value_for_notfound->name); } - if (!SvOK(*sv) && SvTYPE(*sv) != SVt_PVGV) { + sv = HeVAL(he); + if (!SvOK(sv) && SvTYPE(sv) != SVt_PVGV) { /* Nothing was here before, so mark a prototype of "" */ - sv_setpvn(*sv, "", 0); - } else if (SvPOK(*sv) && SvCUR(*sv) == 0) { + sv_setpvn(sv, "", 0); + } else if (SvPOK(sv) && SvCUR(sv) == 0) { /* There is already a prototype of "" - do nothing */ } else { /* Someone has been here before us - have to make a real @@ -476,8 +483,10 @@ EXPLODE CvXSUBANY(cv).any_ptr = NULL; } #ifndef SYMBIAN - if (!hv_store(${c_subname}_missing, value_for_notfound->name, - value_for_notfound->namelen, &PL_sv_yes, 0)) + hek = HeKEY_hek(he); + if (!hv_common(${c_subname}_missing, NULL, HEK_KEY(hek), + HEK_LEN(hek), HEK_FLAGS(hek), HV_FETCH_ISSTORE, + &PL_sv_yes, HEK_HASH(hek))) Perl_croak($athx "Couldn't add key '%s' to missing_hash", value_for_notfound->name); #endif -- Perl5 Master Repository
