From c77244152327e2223e55144a463094790d835933 Mon Sep 17 00:00:00 2001 From: Father Chrysostomos Date: Sun, 5 Aug 2012 17:22:29 -0700 Subject: assert_(...) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This new macro expands to ‘assert(...),’ (with a trailing comma) under debugging builds; the empty string otherwise. It allows for the removal of some #ifdef DEBUGGINGs, which could not be avoided otherwise. --- cop.h | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'cop.h') diff --git a/cop.h b/cop.h index ed55483a94..8a0ea80b16 100644 --- a/cop.h +++ b/cop.h @@ -420,12 +420,8 @@ struct cop { ? GvSV(gv_fetchfile(CopFILE(c))) : NULL) # define CopFILEAV(c) (CopFILE(c) \ ? GvAV(gv_fetchfile(CopFILE(c))) : NULL) -# ifdef DEBUGGING -# define CopFILEAVx(c) (assert(CopFILE(c)), \ +# define CopFILEAVx(c) (assert_(CopFILE(c)) \ GvAV(gv_fetchfile(CopFILE(c)))) -# else -# define CopFILEAVx(c) (GvAV(gv_fetchfile(CopFILE(c)))) -# endif # define CopSTASH(c) PL_stashpad[(c)->cop_stashoff] # define CopSTASH_set(c,hv) ((c)->cop_stashoff = (hv) \ -- cgit v1.2.1