[nginx] svn commit: r4398 - trunk/src/core

ru at nginx.com ru at nginx.com
Tue Jan 10 07:28:33 UTC 2012


Author: ru
Date: 2012-01-10 07:28:32 +0000 (Tue, 10 Jan 2012)
New Revision: 4398

Log:
Changed ngx_log_debugN() macros to verify the number of arguments
when built with debugging.


Modified:
   trunk/src/core/ngx_log.h

Modified: trunk/src/core/ngx_log.h
===================================================================
--- trunk/src/core/ngx_log.h	2011-12-29 15:58:53 UTC (rev 4397)
+++ trunk/src/core/ngx_log.h	2012-01-10 07:28:32 UTC (rev 4398)
@@ -121,17 +121,40 @@
 
 #if (NGX_HAVE_VARIADIC_MACROS)
 
-#define ngx_log_debug0  ngx_log_debug
-#define ngx_log_debug1  ngx_log_debug
-#define ngx_log_debug2  ngx_log_debug
-#define ngx_log_debug3  ngx_log_debug
-#define ngx_log_debug4  ngx_log_debug
-#define ngx_log_debug5  ngx_log_debug
-#define ngx_log_debug6  ngx_log_debug
-#define ngx_log_debug7  ngx_log_debug
-#define ngx_log_debug8  ngx_log_debug
+#define ngx_log_debug0(level, log, err, fmt)                                  \
+        ngx_log_debug(level, log, err, fmt)
 
+#define ngx_log_debug1(level, log, err, fmt, arg1)                            \
+        ngx_log_debug(level, log, err, fmt, arg1)
 
+#define ngx_log_debug2(level, log, err, fmt, arg1, arg2)                      \
+        ngx_log_debug(level, log, err, fmt, arg1, arg2)
+
+#define ngx_log_debug3(level, log, err, fmt, arg1, arg2, arg3)                \
+        ngx_log_debug(level, log, err, fmt, arg1, arg2, arg3)
+
+#define ngx_log_debug4(level, log, err, fmt, arg1, arg2, arg3, arg4)          \
+        ngx_log_debug(level, log, err, fmt, arg1, arg2, arg3, arg4)
+
+#define ngx_log_debug5(level, log, err, fmt, arg1, arg2, arg3, arg4, arg5)    \
+        ngx_log_debug(level, log, err, fmt, arg1, arg2, arg3, arg4, arg5)
+
+#define ngx_log_debug6(level, log, err, fmt,                                  \
+                       arg1, arg2, arg3, arg4, arg5, arg6)                    \
+        ngx_log_debug(level, log, err, fmt,                                   \
+                       arg1, arg2, arg3, arg4, arg5, arg6)
+
+#define ngx_log_debug7(level, log, err, fmt,                                  \
+                       arg1, arg2, arg3, arg4, arg5, arg6, arg7)              \
+        ngx_log_debug(level, log, err, fmt,                                   \
+                       arg1, arg2, arg3, arg4, arg5, arg6, arg7)
+
+#define ngx_log_debug8(level, log, err, fmt,                                  \
+                       arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8)        \
+        ngx_log_debug(level, log, err, fmt,                                   \
+                       arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8)
+
+
 #else /* NO VARIADIC MACROS */
 
 #define ngx_log_debug0(level, log, err, fmt)                                  \



More information about the nginx-devel mailing list