summaryrefslogtreecommitdiff
path: root/perl.h
diff options
context:
space:
mode:
authorAbhijit Menon-Sen <ams@wiw.org>2001-05-31 17:46:22 +0530
committerJarkko Hietaniemi <jhi@iki.fi>2001-05-31 12:11:24 +0000
commit5f80b19c098425222090200cb7bf3df422ed176d (patch)
tree247502fb5d4b7f2cfa6b13bcb37bf410b2b61766 /perl.h
parent13689cfe324c4b1548f53eda346b78570974f93e (diff)
downloadperl-5f80b19c098425222090200cb7bf3df422ed176d.tar.gz
[PATCH] DEBUG_* macro cleanups
Date: Thu, 31 May 2001 12:16:22 +0530 Message-ID: <20010531121622.B4829@lustre.linux.in> Subject: Re: [PATCH] DEBUG_* macro cleanups From: Abhijit Menon-Sen <ams@wiw.org> Date: Thu, 31 May 2001 13:57:01 +0530 Message-ID: <20010531135701.A21775@lustre.linux.in> (The DEBUG_ definitions in perl.h changed to use the STMT_START and STMT_END.) p4raw-id: //depot/perl@10353
Diffstat (limited to 'perl.h')
-rw-r--r--perl.h27
1 files changed, 16 insertions, 11 deletions
diff --git a/perl.h b/perl.h
index 7286921c9b..1aee654dde 100644
--- a/perl.h
+++ b/perl.h
@@ -2263,23 +2263,28 @@ Gid_t getegid (void);
} STMT_END
# endif
-# define DEBUG_f(a) if (DEBUG_f_TEST) a
-# define DEBUG_r(a) if (DEBUG_r_TEST) a
-# define DEBUG_x(a) if (DEBUG_x_TEST) a
-# define DEBUG_u(a) if (DEBUG_u_TEST) a
-# define DEBUG_L(a) if (DEBUG_L_TEST) a
-# define DEBUG_H(a) if (DEBUG_H_TEST) a
-# define DEBUG_X(a) if (DEBUG_X_TEST) a
-# define DEBUG_D(a) if (DEBUG_D_TEST) a
+# define DEBUG__(t, a) \
+ STMT_START { \
+ if (t) STMT_START {a;} STMT_END; \
+ } STMT_END
+
+# define DEBUG_f(a) DEBUG__(DEBUG_f_TEST, a)
+# define DEBUG_r(a) DEBUG__(DEBUG_r_TEST, a)
+# define DEBUG_x(a) DEBUG__(DEBUG_x_TEST, a)
+# define DEBUG_u(a) DEBUG__(DEBUG_u_TEST, a)
+# define DEBUG_L(a) DEBUG__(DEBUG_L_TEST, a)
+# define DEBUG_H(a) DEBUG__(DEBUG_H_TEST, a)
+# define DEBUG_X(a) DEBUG__(DEBUG_X_TEST, a)
+# define DEBUG_D(a) DEBUG__(DEBUG_D_TEST, a)
# ifdef USE_THREADS
-# define DEBUG_S(a) if (DEBUG_S_TEST) a
+# define DEBUG_S(a) DEBUG__(DEBUG_S_TEST, a)
# else
# define DEBUG_S(a)
# endif
-# define DEBUG_T(a) if (DEBUG_T_TEST) a
-# define DEBUG_R(a) if (DEBUG_R_TEST) a
+# define DEBUG_T(a) DEBUG__(DEBUG_T_TEST, a)
+# define DEBUG_R(a) DEBUG__(DEBUG_R_TEST, a)
#else /* DEBUGGING */