This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Move a macro from utf8.h to handy.h for wider use.
authorKarl Williamson <public@khwilliamson.com>
Wed, 1 Jan 2014 05:13:06 +0000 (22:13 -0700)
committerKarl Williamson <public@khwilliamson.com>
Wed, 1 Jan 2014 20:49:24 +0000 (13:49 -0700)
Future commits will want this available outside utf8.h

handy.h
utf8.h

diff --git a/handy.h b/handy.h
index cc6b564..fb84cb9 100644 (file)
--- 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
 
diff --git a/utf8.h b/utf8.h
index 8504207..2d48775 100644 (file)
--- a/utf8.h
+++ b/utf8.h
@@ -364,16 +364,6 @@ Perl's extended UTF-8 means we can have start bytes up to FF.
               I8_TO_NATIVE_UTF8((translate_function(c) & UTF_CONTINUATION_MASK) \
                                  | UTF_CONTINUATION_MARK)
 
-/* This is another 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
-
 /* The next two macros should not be used.  They were designed to be usable as
  * the case label of a switch statement, but this doesn't work for EBCDIC.  Use
  * regen/unicode_constants.pl instead */