diff options
author | Father Chrysostomos <sprout@cpan.org> | 2012-08-05 17:22:29 -0700 |
---|---|---|
committer | Father Chrysostomos <sprout@cpan.org> | 2012-08-05 22:27:04 -0700 |
commit | c77244152327e2223e55144a463094790d835933 (patch) | |
tree | 33363317bab89d55fe54551e0ed22090053cbd67 /op.h | |
parent | b166eea9cd004d916f7322015c1c4337c549ac08 (diff) | |
download | perl-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.h | 6 |
1 files changed, 1 insertions, 5 deletions
@@ -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) \ |