summaryrefslogtreecommitdiff
path: root/av.c
diff options
context:
space:
mode:
Diffstat (limited to 'av.c')
-rw-r--r--av.c14
1 files changed, 3 insertions, 11 deletions
diff --git a/av.c b/av.c
index 472600b6f0..1671f16e40 100644
--- a/av.c
+++ b/av.c
@@ -437,7 +437,6 @@ Perl_av_clear(pTHX_ register AV *av)
{
dVAR;
I32 extra;
- bool real;
PERL_ARGS_ASSERT_AV_CLEAR;
assert(SvTYPE(av) == SVt_PVAV);
@@ -463,11 +462,9 @@ Perl_av_clear(pTHX_ register AV *av)
if (AvMAX(av) < 0)
return;
- if ((real = !!AvREAL(av))) {
+ if (AvREAL(av)) {
SV** const ary = AvARRAY(av);
I32 index = AvFILLp(av) + 1;
- ENTER;
- SAVEFREESV(SvREFCNT_inc_simple_NN(av));
while (index) {
SV * const sv = ary[--index];
/* undef the slot before freeing the value, because a
@@ -482,7 +479,7 @@ Perl_av_clear(pTHX_ register AV *av)
AvARRAY(av) = AvALLOC(av);
}
AvFILLp(av) = -1;
- if (real) LEAVE;
+
}
/*
@@ -496,8 +493,6 @@ Undefines the array. Frees the memory used by the array itself.
void
Perl_av_undef(pTHX_ register AV *av)
{
- bool real;
-
PERL_ARGS_ASSERT_AV_UNDEF;
assert(SvTYPE(av) == SVt_PVAV);
@@ -505,10 +500,8 @@ Perl_av_undef(pTHX_ register AV *av)
if (SvTIED_mg((const SV *)av, PERL_MAGIC_tied))
av_fill(av, -1);
- if ((real = !!AvREAL(av))) {
+ if (AvREAL(av)) {
register I32 key = AvFILLp(av) + 1;
- ENTER;
- SAVEFREESV(SvREFCNT_inc_simple_NN(av));
while (key)
SvREFCNT_dec(AvARRAY(av)[--key]);
}
@@ -519,7 +512,6 @@ Perl_av_undef(pTHX_ register AV *av)
AvMAX(av) = AvFILLp(av) = -1;
if(SvRMAGICAL(av)) mg_clear(MUTABLE_SV(av));
- if(real) LEAVE;
}
/*