summaryrefslogtreecommitdiff
path: root/cop.h
diff options
context:
space:
mode:
authorFather Chrysostomos <sprout@cpan.org>2012-08-05 17:22:29 -0700
committerFather Chrysostomos <sprout@cpan.org>2012-08-05 22:27:04 -0700
commitc77244152327e2223e55144a463094790d835933 (patch)
tree33363317bab89d55fe54551e0ed22090053cbd67 /cop.h
parentb166eea9cd004d916f7322015c1c4337c549ac08 (diff)
downloadperl-c77244152327e2223e55144a463094790d835933.tar.gz
assert_(...)
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.
Diffstat (limited to 'cop.h')
-rw-r--r--cop.h6
1 files changed, 1 insertions, 5 deletions
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) \