summaryrefslogtreecommitdiff
path: root/op.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 /op.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 'op.h')
-rw-r--r--op.h6
1 files changed, 1 insertions, 5 deletions
diff --git a/op.h b/op.h
index 3f1e250f7a..c4147cee2a 100644
--- a/op.h
+++ b/op.h
@@ -748,12 +748,8 @@ struct opslab {
# define OPSLOT_HEADER STRUCT_OFFSET(OPSLOT, opslot_op)
# define OPSLOT_HEADER_P (OPSLOT_HEADER/sizeof(I32 *))
-# ifdef DEBUGGING
-# define OpSLOT(o) (assert(o->op_slabbed), \
+# define OpSLOT(o) (assert_(o->op_slabbed) \
(OPSLOT *)(((char *)o)-OPSLOT_HEADER))
-# else
-# define OpSLOT(o) ((OPSLOT *)(((char *)o)-OPSLOT_HEADER))
-# endif
# define OpSLAB(o) OpSLOT(o)->opslot_slab
# define OpslabREFCNT_dec(slab) \
(((slab)->opslab_refcnt == 1) \