This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Perl_newSV_type_mortal - new inline function introduced and used
[perl5.git] / regcomp.c
index f5a8aa0..0051936 100644 (file)
--- a/regcomp.c
+++ b/regcomp.c
@@ -16869,8 +16869,8 @@ S_handle_regex_sets(pTHX_ RExC_state_t *pRExC_state, SV** return_invlist,
      * so that everything gets evaluated down to a single operand, which is the
      * result */
 
-    sv_2mortal((SV *)(stack = newAV()));
-    sv_2mortal((SV *)(fence_stack = newAV()));
+    stack = (AV*)newSV_type_mortal(SVt_PVAV);
+    fence_stack = (AV*)newSV_type_mortal(SVt_PVAV);
 
     while (RExC_parse < RExC_end) {
         I32 top_index;              /* Index of top-most element in 'stack' */