In perl.git, the branch blead has been updated

<http://perl5.git.perl.org/perl.git/commitdiff/75f9f0f4a5b87cb0d9dcf120e32c2681037c3bc3?hp=6110d17a2fe1cbf8032b2a6bfe6681379f50b800>

- Log -----------------------------------------------------------------
commit 75f9f0f4a5b87cb0d9dcf120e32c2681037c3bc3
Author: Daniel Dragan <[email protected]>
Date:   Thu Sep 18 12:44:15 2014 -0400

    in Perl_sv_copypv_flags move mg_get call to callee
    
    Perl_sv_2pv_flags already has logic to check for and call mg_get, which
    can't be removed due to API, so dont do it in the caller. This makes
    Perl_sv_copypv_flags smaller/faster by removing the branch.
-----------------------------------------------------------------------

Summary of changes:
 sv.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/sv.c b/sv.c
index 8e52a99..9723d3c 100644
--- a/sv.c
+++ b/sv.c
@@ -3157,9 +3157,7 @@ Perl_sv_copypv_flags(pTHX_ SV *const dsv, SV *const ssv, 
const I32 flags)
 
     PERL_ARGS_ASSERT_SV_COPYPV_FLAGS;
 
-    if ((flags & SV_GMAGIC) && SvGMAGICAL(ssv))
-       mg_get(ssv);
-    s = SvPV_nomg_const(ssv,len);
+    s = SvPV_flags_const(ssv,len,flags & SV_GMAGIC);
     sv_setpvn(dsv,s,len);
     if (SvUTF8(ssv))
        SvUTF8_on(dsv);

--
Perl5 Master Repository

Reply via email to