summaryrefslogtreecommitdiff
path: root/handy.h
diff options
context:
space:
mode:
authorKarl Williamson <public@khwilliamson.com>2013-12-31 22:13:06 -0700
committerKarl Williamson <public@khwilliamson.com>2014-01-01 13:49:24 -0700
commit0f092d081073e047f09aa9ef4f1d62bf5db65747 (patch)
tree9f25954052f9270fc289a88befe80f2b730e8e2e /handy.h
parent7c08c4c54fcfe6d3c4509e5c583cbb38723f9237 (diff)
downloadperl-0f092d081073e047f09aa9ef4f1d62bf5db65747.tar.gz
Move a macro from utf8.h to handy.h for wider use.
Future commits will want this available outside utf8.h
Diffstat (limited to 'handy.h')
-rw-r--r--handy.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/handy.h b/handy.h
index cc6b56446b..fb84cb9aff 100644
--- a/handy.h
+++ b/handy.h
@@ -270,6 +270,16 @@ typedef U64TYPE U64;
#define Ctl(ch) ((ch) & 037)
+/* This is a helper macro to avoid preprocessor issues, expanding to an
+ * assert followed by a comma under DEBUGGING (hence the comma operator). If
+ * we didn't do this, we would get a comma with nothing before it when not
+ * DEBUGGING */
+#ifdef DEBUGGING
+# define __ASSERT_(statement) assert(statement),
+#else
+# define __ASSERT_(statement)
+#endif
+
/*
=head1 SV-Body Allocation