This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Tweak the generated Errno.pm slightly. Shorter and slightly fewer ops.
[perl5.git] / mro.c
diff --git a/mro.c b/mro.c
index 7131593..488e564 100644 (file)
--- a/mro.c
+++ b/mro.c
@@ -162,23 +162,22 @@ Perl_mro_meta_dup(pTHX_ struct mro_meta* smeta, CLONE_PARAMS* param)
 
     if (newmeta->mro_linear_all) {
        newmeta->mro_linear_all
-           = MUTABLE_HV(SvREFCNT_inc(sv_dup((const SV *)newmeta->mro_linear_all, param)));
+           = MUTABLE_HV(sv_dup_inc((const SV *)newmeta->mro_linear_all, param));
        /* This is just acting as a shortcut pointer, and will be automatically
           updated on the first get.  */
        newmeta->mro_linear_current = NULL;
     } else if (newmeta->mro_linear_current) {
        /* Only the current MRO is stored, so this owns the data.  */
        newmeta->mro_linear_current
-           = SvREFCNT_inc(sv_dup((const SV *)newmeta->mro_linear_current,
-                                 param));
+           = sv_dup_inc((const SV *)newmeta->mro_linear_current, param);
     }
 
     if (newmeta->mro_nextmethod)
        newmeta->mro_nextmethod
-           = MUTABLE_HV(SvREFCNT_inc(sv_dup((const SV *)newmeta->mro_nextmethod, param)));
+           = MUTABLE_HV(sv_dup_inc((const SV *)newmeta->mro_nextmethod, param));
     if (newmeta->isa)
        newmeta->isa
-           = MUTABLE_HV(SvREFCNT_inc(sv_dup((const SV *)newmeta->isa, param)));
+           = MUTABLE_HV(sv_dup_inc((const SV *)newmeta->isa, param));
 
     return newmeta;
 }
@@ -324,7 +323,7 @@ S_mro_get_linear_isa_dfs(pTHX_ HV *stash, U32 level)
                   with it.  */
                if (basestash) {
                    SV **svp;
-                   stored = MUTABLE_HV(sv_2mortal(newHVhv(HvMROMETA(basestash)->isa)));
+                   stored = MUTABLE_HV(sv_2mortal((SV*)newHVhv(HvMROMETA(basestash)->isa)));
                    av_extend(retval, subrv_items);
                    AvFILLp(retval) = subrv_items;
                    svp = AvARRAY(retval);