I32 key;
PERL_ARGS_ASSERT_AV_REIFY;
+ assert(SvTYPE(av) == SVt_PVAV);
if (AvREAL(av))
return;
MAGIC *mg;
PERL_ARGS_ASSERT_AV_EXTEND;
+ assert(SvTYPE(av) == SVt_PVAV);
mg = SvTIED_mg((SV*)av, PERL_MAGIC_tied);
if (mg) {
dVAR;
PERL_ARGS_ASSERT_AV_FETCH;
+ assert(SvTYPE(av) == SVt_PVAV);
if (SvRMAGICAL(av)) {
const MAGIC * const tied_magic = mg_find((SV*)av, PERL_MAGIC_tied);
SV** ary;
PERL_ARGS_ASSERT_AV_STORE;
+ assert(SvTYPE(av) == SVt_PVAV);
/* S_regclass relies on being able to pass in a NULL sv
(unicode_alternate may be NULL).
register AV * const av = (AV*)newSV_type(SVt_PVAV);
/* sv_upgrade does AvREAL_only() */
PERL_ARGS_ASSERT_AV_MAKE;
+ assert(SvTYPE(av) == SVt_PVAV);
+
if (size) { /* "defined" was returning undef for size==0 anyway. */
register SV** ary;
register I32 i;
I32 extra;
PERL_ARGS_ASSERT_AV_CLEAR;
+ assert(SvTYPE(av) == SVt_PVAV);
+
#ifdef DEBUGGING
if (SvREFCNT(av) == 0 && ckWARN_d(WARN_DEBUGGING)) {
Perl_warner(aTHX_ packWARN(WARN_DEBUGGING), "Attempt to clear deleted array");
Perl_av_undef(pTHX_ register AV *av)
{
PERL_ARGS_ASSERT_AV_UNDEF;
+ assert(SvTYPE(av) == SVt_PVAV);
/* Give any tie a chance to cleanup first */
if (SvTIED_mg((SV*)av, PERL_MAGIC_tied))
Perl_av_create_and_push(pTHX_ AV **const avp, SV *const val)
{
PERL_ARGS_ASSERT_AV_CREATE_AND_PUSH;
+
if (!*avp)
*avp = newAV();
av_push(*avp, val);
MAGIC *mg;
PERL_ARGS_ASSERT_AV_PUSH;
+ assert(SvTYPE(av) == SVt_PVAV);
if (SvREADONLY(av))
Perl_croak(aTHX_ PL_no_modify);
MAGIC* mg;
PERL_ARGS_ASSERT_AV_POP;
+ assert(SvTYPE(av) == SVt_PVAV);
if (SvREADONLY(av))
Perl_croak(aTHX_ PL_no_modify);
Perl_av_create_and_unshift_one(pTHX_ AV **const avp, SV *const val)
{
PERL_ARGS_ASSERT_AV_CREATE_AND_UNSHIFT_ONE;
+
if (!*avp)
*avp = newAV();
av_unshift(*avp, 1);
MAGIC* mg;
PERL_ARGS_ASSERT_AV_UNSHIFT;
+ assert(SvTYPE(av) == SVt_PVAV);
if (SvREADONLY(av))
Perl_croak(aTHX_ PL_no_modify);
MAGIC* mg;
PERL_ARGS_ASSERT_AV_SHIFT;
+ assert(SvTYPE(av) == SVt_PVAV);
if (SvREADONLY(av))
Perl_croak(aTHX_ PL_no_modify);
Perl_av_len(pTHX_ register const AV *av)
{
PERL_ARGS_ASSERT_AV_LEN;
+ assert(SvTYPE(av) == SVt_PVAV);
+
return AvFILL(av);
}
MAGIC *mg;
PERL_ARGS_ASSERT_AV_FILL;
+ assert(SvTYPE(av) == SVt_PVAV);
if (fill < 0)
fill = -1;
SV *sv;
PERL_ARGS_ASSERT_AV_DELETE;
+ assert(SvTYPE(av) == SVt_PVAV);
if (SvREADONLY(av))
Perl_croak(aTHX_ PL_no_modify);
{
dVAR;
PERL_ARGS_ASSERT_AV_EXISTS;
+ assert(SvTYPE(av) == SVt_PVAV);
if (SvRMAGICAL(av)) {
const MAGIC * const tied_magic = mg_find((SV*)av, PERL_MAGIC_tied);
MAGIC *mg;
PERL_ARGS_ASSERT_GET_AUX_MG;
+ assert(SvTYPE(av) == SVt_PVAV);
mg = mg_find((SV*)av, PERL_MAGIC_arylen_p);
MAGIC *const mg = get_aux_mg(av);
PERL_ARGS_ASSERT_AV_ARYLEN_P;
+ assert(SvTYPE(av) == SVt_PVAV);
return &(mg->mg_obj);
}
MAGIC *const mg = get_aux_mg(av);
PERL_ARGS_ASSERT_AV_ITER_P;
+ assert(SvTYPE(av) == SVt_PVAV);
#if IVSIZE == I32SIZE
return (IV *)&(mg->mg_len);