Cleanup; replace a croak("panic: ...") with assert().
Gisle Aas [Wed, 28 Dec 2005 13:25:30 +0000 (13:25 +0000)]
p4raw-id: //depot/perl@26514

av.c

diff --git a/av.c b/av.c
index 1366263..6223136 100644 (file)
--- a/av.c
+++ b/av.c
@@ -919,10 +919,7 @@ Perl_av_arylen_p(pTHX_ AV *av) {
     if (!mg) {
        mg = sv_magicext((SV*)av, 0, PERL_MAGIC_arylen_p, &PL_vtbl_arylen_p,
                         0, 0);
-
-       if (!mg) {
-           Perl_die(aTHX_ "panic: av_arylen_p");
-       }
+       assert(mg);
        /* sv_magicext won't set this for us because we pass in a NULL obj  */
        mg->mg_flags |= MGf_REFCOUNTED;
     }