This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
op.c: newLOOPOP: Remove code supporting do-sub
[perl5.git] / inline_invlist.c
index 470659b..1aea9f7 100644 (file)
@@ -25,6 +25,8 @@ S_get_invlist_offset_addr(pTHX_ SV* invlist)
 
     PERL_ARGS_ASSERT_GET_INVLIST_OFFSET_ADDR;
 
+    assert(SvTYPE(invlist) == SVt_INVLIST);
+
     return &(((XINVLIST*) SvANY(invlist))->is_offset);
 }
 
@@ -36,6 +38,8 @@ S__invlist_len(pTHX_ SV* const invlist)
 
     PERL_ARGS_ASSERT__INVLIST_LEN;
 
+    assert(SvTYPE(invlist) == SVt_INVLIST);
+
     return (SvCUR(invlist) == 0)
            ? 0
            : FROM_INTERNAL_SIZE(SvCUR(invlist)) - *get_invlist_offset_addr(invlist);