This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
fix XXX on DEBUG_TOP_FLAG comment
authorJim Cromie <jim.cromie@gmail.com>
Sat, 4 Apr 2015 18:49:27 +0000 (12:49 -0600)
committerTony Cook <tony@develop-help.com>
Tue, 2 Jun 2015 05:10:37 +0000 (15:10 +1000)
DEBUG_TOP_FLAG is ORd into PL_debug when -D option is used, so that
"if (PL_debug)" can be used, w/o also enabling (or requiring) any
specific DEBUG_(.)_FLAGs.  It is used in Perl_runops_debug to
short-circuit several DEBUG_(.)_TESTs.

perl.h

diff --git a/perl.h b/perl.h
index dcb184b..0f6f679 100644 (file)
--- a/perl.h
+++ b/perl.h
@@ -4007,8 +4007,7 @@ Gid_t getegid (void);
 #define DEBUG_MASK             0x07FFEFFF /* mask of all the standard flags */
 
 #define DEBUG_DB_RECURSE_FLAG  0x40000000
-#define DEBUG_TOP_FLAG         0x80000000 /* XXX what's this for ??? Signal
-                                             that something was done? */
+#define DEBUG_TOP_FLAG         0x80000000 /* -D was given --> PL_debug |= FLAG */
 
 #  define DEBUG_p_TEST_ (PL_debug & DEBUG_p_FLAG)
 #  define DEBUG_s_TEST_ (PL_debug & DEBUG_s_FLAG)