@@ -255,7 +255,7 @@ S_mro_get_linear_isa_dfs(pTHX_ HV *stash, U32 level)
255255
256256    /* not in cache, make a new one */ 
257257
258-     retval  =  MUTABLE_AV (sv_2mortal ( MUTABLE_SV ( newAV ()) ));
258+     retval  =  MUTABLE_AV (newSV_type_mortal ( SVt_PVAV ));
259259    /* We use this later in this function, but don't need a reference to it 
260260       beyond the end of this function, so reference count is fine.  */ 
261261    our_name  =  newSVhek (stashhek );
@@ -347,7 +347,7 @@ S_mro_get_linear_isa_dfs(pTHX_ HV *stash, U32 level)
347347                } else  {
348348                    /* They have no stash.  So create ourselves an ->isa cache 
349349                       as if we'd copied it from what theirs should be.  */ 
350-                     stored  =  MUTABLE_HV (sv_2mortal ( MUTABLE_SV ( newHV ()) ));
350+                     stored  =  MUTABLE_HV (newSV_type_mortal ( SVt_PVHV ));
351351                    (void ) hv_stores (stored , "UNIVERSAL" , & PL_sv_undef );
352352                    av_push (retval ,
353353                            newSVhek (HeKEY_hek (hv_store_ent (stored , sv ,
@@ -357,7 +357,7 @@ S_mro_get_linear_isa_dfs(pTHX_ HV *stash, U32 level)
357357        }
358358    } else  {
359359        /* We have no parents.  */ 
360-         stored  =  MUTABLE_HV (sv_2mortal ( MUTABLE_SV ( newHV ()) ));
360+         stored  =  MUTABLE_HV (newSV_type_mortal ( SVt_PVHV ));
361361        (void ) hv_stores (stored , "UNIVERSAL" , & PL_sv_undef );
362362    }
363363
@@ -428,7 +428,7 @@ Perl_mro_get_linear_isa(pTHX_ HV *stash)
428428            SV  * * svp ;
429429            SV  * * ovp  =  AvARRAY (old );
430430            SV  *  const  *  const  oend  =  ovp  +  AvFILLp (old ) +  1 ;
431-             isa  =  (AV  * )sv_2mortal (( SV   * ) newAV () );
431+             isa  =  (AV  * )newSV_type_mortal ( SVt_PVAV );
432432            av_extend (isa , AvFILLp (isa ) =  AvFILLp (old )+ 1 );
433433            * AvARRAY (isa ) =  namesv ;
434434            svp  =  AvARRAY (isa )+ 1 ;
@@ -570,7 +570,7 @@ Perl_mro_isa_changed_in(pTHX_ HV* stash)
570570        if (hv_iterinit (isarev )) {
571571            /* Only create the hash if we need it; i.e., if isarev has 
572572               any elements. */ 
573-             isa_hashes  =  (HV  * )sv_2mortal (( SV   * ) newHV () );
573+             isa_hashes  =  (HV  * )newSV_type_mortal ( SVt_PVHV );
574574        }
575575        while ((iter  =  hv_iternext (isarev ))) {
576576            HV *  revstash  =  gv_stashsv (hv_iterkeysv (iter ), 0 );
@@ -817,7 +817,7 @@ Perl_mro_package_moved(pTHX_ HV * const stash, HV * const oldstash,
817817    }
818818    else  {
819819        SV  * aname ;
820-         namesv  =  sv_2mortal (( SV   * ) newAV () );
820+         namesv  =  newSV_type_mortal ( SVt_PVAV );
821821        while  (name_count -- ) {
822822            if (memEQs (HEK_KEY (* namep ), HEK_LEN (* namep ), "main" )){
823823                aname  =  GvNAMELEN (gv ) ==  1 
@@ -854,9 +854,9 @@ Perl_mro_package_moved(pTHX_ HV * const stash, HV * const oldstash,
854854       wrong name. The names must be set on *all* affected stashes before 
855855       we do anything else. (And linearisations must be cleared, too.) 
856856     */ 
857-     stashes  =  (HV  * ) sv_2mortal (( SV   * ) newHV () );
857+     stashes  =  (HV  * ) newSV_type_mortal ( SVt_PVHV );
858858    mro_gather_and_rename (
859-      stashes , (HV  * ) sv_2mortal (( SV   * ) newHV () ),
859+      stashes , (HV  * ) newSV_type_mortal ( SVt_PVHV ),
860860     stash , oldstash , namesv 
861861    );
862862
@@ -1119,7 +1119,7 @@ S_mro_gather_and_rename(pTHX_ HV * const stashes, HV * const seen_stashes,
11191119    /* Skip the entire loop if the hash is empty.   */ 
11201120    if (oldstash  &&  HvTOTALKEYS (oldstash )) {
11211121        xhv  =  (XPVHV * )SvANY (oldstash );
1122-         seen  =  (HV  * ) sv_2mortal (( SV   * ) newHV () );
1122+         seen  =  (HV  * ) newSV_type_mortal ( SVt_PVHV );
11231123
11241124        /* Iterate through entries in the oldstash, adding them to the 
11251125           list, meanwhile doing the equivalent of $seen{$key} = 1. 
@@ -1164,7 +1164,7 @@ S_mro_gather_and_rename(pTHX_ HV * const stashes, HV * const seen_stashes,
11641164                            SV  * aname ;
11651165                            items  =  AvFILLp ((AV  * )namesv ) +  1 ;
11661166                            svp  =  AvARRAY ((AV  * )namesv );
1167-                             subname  =  sv_2mortal (( SV   * ) newAV () );
1167+                             subname  =  newSV_type_mortal ( SVt_PVAV );
11681168                            while  (items -- ) {
11691169                                aname  =  newSVsv (* svp ++ );
11701170                                if  (len  ==  1 )
@@ -1247,7 +1247,7 @@ S_mro_gather_and_rename(pTHX_ HV * const stashes, HV * const seen_stashes,
12471247                            SV  * aname ;
12481248                            items  =  AvFILLp ((AV  * )namesv ) +  1 ;
12491249                            svp  =  AvARRAY ((AV  * )namesv );
1250-                             subname  =  sv_2mortal (( SV   * ) newAV () );
1250+                             subname  =  newSV_type_mortal ( SVt_PVAV );
12511251                            while  (items -- ) {
12521252                                aname  =  newSVsv (* svp ++ );
12531253                                if  (len  ==  1 )
0 commit comments