This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
move DEBUGGING section after includes in regexec.c.
authorCraig A. Berry <craigberry@mac.com>
Thu, 14 Nov 2013 14:08:34 +0000 (08:08 -0600)
committerCraig A. Berry <craigberry@mac.com>
Thu, 14 Nov 2013 14:08:34 +0000 (08:08 -0600)
7b75fc16a59 added #ifdef DEBUGGING around a declaration, but that
section of code was before any includes, and (on VMS anyway),
DEBUGGING is defined in config.h, not on the command line.

So just move that declaration after the includes, which is a more
normal way to do things anyway.

regexec.c

index 1aba438..acca274 100644 (file)
--- a/regexec.c
+++ b/regexec.c
 #include "re_top.h"
 #endif
 
-#ifdef DEBUGGING
-/* At least one required character in the target string is expressible only in
- * UTF-8. */
-static const char* const non_utf8_target_but_utf8_required
-                = "Can't match, because target string needs to be in UTF-8\n";
-#endif
-
-#define NON_UTF8_TARGET_BUT_UTF8_REQUIRED(target) STMT_START { \
-    DEBUG_EXECUTE_r(PerlIO_printf(Perl_debug_log, "%s", non_utf8_target_but_utf8_required));\
-    goto target; \
-} STMT_END
-
 /*
  * pregcomp and pregexec -- regsub and regerror are not used in perl
  *
@@ -95,6 +83,18 @@ static const char* const non_utf8_target_but_utf8_required
 #include "inline_invlist.c"
 #include "unicode_constants.h"
 
+#ifdef DEBUGGING
+/* At least one required character in the target string is expressible only in
+ * UTF-8. */
+static const char* const non_utf8_target_but_utf8_required
+                = "Can't match, because target string needs to be in UTF-8\n";
+#endif
+
+#define NON_UTF8_TARGET_BUT_UTF8_REQUIRED(target) STMT_START { \
+    DEBUG_EXECUTE_r(PerlIO_printf(Perl_debug_log, "%s", non_utf8_target_but_utf8_required));\
+    goto target; \
+} STMT_END
+
 #define HAS_NONLATIN1_FOLD_CLOSURE(i) _HAS_NONLATIN1_FOLD_CLOSURE_ONLY_FOR_USE_BY_REGCOMP_DOT_C_AND_REGEXEC_DOT_C(i)
 
 #ifndef STATIC