diff options
author | Joshua Pritikin <joshua.pritikin@db.com> | 1999-02-22 06:29:09 -0500 |
---|---|---|
committer | Gurusamy Sarathy <gsar@cpan.org> | 1999-02-24 04:15:18 +0000 |
commit | 6f44e0a465a27bf3feb247a739669f0da7dbd295 (patch) | |
tree | 3259b47285aa58ebfafc43439e6e497c9cffc2ad /sv.c | |
parent | 2b5ab1e742ea1b1374dcea7f6f90ef5c5cf29914 (diff) | |
download | perl-6f44e0a465a27bf3feb247a739669f0da7dbd295.tar.gz |
improved error message [PATCH _55] [RESEND]
Message-ID: <Pine.GSO.4.02.9902221128200.500-100000@eq1062.wks.na.deuba.com>
p4raw-id: //depot/perl@3018
Diffstat (limited to 'sv.c')
-rw-r--r-- | sv.c | 14 |
1 files changed, 8 insertions, 6 deletions
@@ -2730,6 +2730,14 @@ sv_clear(register SV *sv) } while (SvOBJECT(sv) && SvSTASH(sv) != stash); del_XRV(SvANY(&tmpref)); + + if (SvREFCNT(sv)) { + if (PL_in_clean_objs) + croak("DESTROY created new reference to dead object '%s'", + HvNAME(stash)); + /* DESTROY gave object new lease on life */ + return; + } } if (SvOBJECT(sv)) { @@ -2738,12 +2746,6 @@ sv_clear(register SV *sv) if (SvTYPE(sv) != SVt_PVIO) --PL_sv_objcount; /* XXX Might want something more general */ } - if (SvREFCNT(sv)) { - if (PL_in_clean_objs) - croak("DESTROY created new reference to dead object"); - /* DESTROY gave object new lease on life */ - return; - } } if (SvTYPE(sv) >= SVt_PVMG && SvMAGIC(sv)) mg_free(sv); |