From ea724faac0e9bd1598db5c1f1c5bd689c0be70fc Mon Sep 17 00:00:00 2001 From: Nicholas Clark Date: Thu, 18 Jan 2007 15:48:13 +0000 Subject: [PATCH] Given that we now do the tests in S_visit() to avoid calling the helper function when skippable, no need to retain those tests inside the helper functions do_clean_objs() and do_clean_named_objs(). p4raw-id: //depot/perl@29872 --- sv.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/sv.c b/sv.c index 9ef3eef..b602dda 100644 --- a/sv.c +++ b/sv.c @@ -443,7 +443,8 @@ static void do_clean_objs(pTHX_ SV *ref) { dVAR; - if (SvROK(ref)) { + assert (SvROK(ref)); + { SV * const target = SvRV(ref); if (SvOBJECT(target)) { DEBUG_D((PerlIO_printf(Perl_debug_log, "Cleaning object ref:\n "), sv_dump(ref))); @@ -469,7 +470,8 @@ static void do_clean_named_objs(pTHX_ SV *sv) { dVAR; - if (SvTYPE(sv) == SVt_PVGV && isGV_with_GP(sv) && GvGP(sv)) { + assert(SvTYPE(sv) == SVt_PVGV); + if (isGV_with_GP(sv) && GvGP(sv)) { if (( #ifdef PERL_DONT_CREATE_GVSV GvSV(sv) && -- 2.7.4