Commit: 68ae1f4958e24906992a3207726c0031de9524b5
Author: Campbell Barton
Date:   Tue Jan 29 17:28:44 2019 +1100
Branches: master
https://developer.blender.org/rB68ae1f4958e24906992a3207726c0031de9524b5

Fix CLOG_STR_AT_SEVERITY macro

Part of D4277 by @sobakasu

===================================================================

M       intern/clog/CLG_log.h

===================================================================

diff --git a/intern/clog/CLG_log.h b/intern/clog/CLG_log.h
index 7b7d0135693..20a69ed792c 100644
--- a/intern/clog/CLG_log.h
+++ b/intern/clog/CLG_log.h
@@ -170,7 +170,7 @@ void CLG_logref_init(CLG_LogRef *clg_ref);
 #define CLOG_STR_AT_SEVERITY(clg_ref, severity, verbose_level, str) { \
        CLG_LogType *_lg_ty = CLOG_ENSURE(clg_ref); \
        if (((_lg_ty->flag & CLG_FLAG_USE) && (_lg_ty->level >= verbose_level)) 
|| (severity >= CLG_SEVERITY_WARN)) { \
-               CLG_log_str(lg, severity, __FILE__ ":" STRINGIFY(__LINE__), 
__func__, str); \
+               CLG_log_str(_lg_ty, severity, __FILE__ ":" STRINGIFY(__LINE__), 
__func__, str); \
        } \
 } ((void)0)
 
@@ -188,16 +188,16 @@ void CLG_logref_init(CLG_LogRef *clg_ref);
 #define CLOG_ERROR(clg_ref, ...)       CLOG_AT_SEVERITY(clg_ref, 
CLG_SEVERITY_ERROR, 0, __VA_ARGS__)
 #define CLOG_FATAL(clg_ref, ...)       CLOG_AT_SEVERITY(clg_ref, 
CLG_SEVERITY_FATAL, 0, __VA_ARGS__)
 
-#define CLOG_STR_INFO(clg_ref, level, ...) CLOG_STR_AT_SEVERITY(clg_ref, 
CLG_SEVERITY_INFO, level, __VA_ARGS__)
-#define CLOG_STR_WARN(clg_ref, ...)        CLOG_STR_AT_SEVERITY(clg_ref, 
CLG_SEVERITY_WARN, 0, __VA_ARGS__)
-#define CLOG_STR_ERROR(clg_ref, ...)       CLOG_STR_AT_SEVERITY(clg_ref, 
CLG_SEVERITY_ERROR, 0, __VA_ARGS__)
-#define CLOG_STR_FATAL(clg_ref, ...)       CLOG_STR_AT_SEVERITY(clg_ref, 
CLG_SEVERITY_FATAL, 0, __VA_ARGS__)
+#define CLOG_STR_INFO(clg_ref, level, str) CLOG_STR_AT_SEVERITY(clg_ref, 
CLG_SEVERITY_INFO, level, str)
+#define CLOG_STR_WARN(clg_ref, str)        CLOG_STR_AT_SEVERITY(clg_ref, 
CLG_SEVERITY_WARN, 0, str)
+#define CLOG_STR_ERROR(clg_ref, str)       CLOG_STR_AT_SEVERITY(clg_ref, 
CLG_SEVERITY_ERROR, 0, str)
+#define CLOG_STR_FATAL(clg_ref, str)       CLOG_STR_AT_SEVERITY(clg_ref, 
CLG_SEVERITY_FATAL, 0, str)
 
 /* Allocated string which is immediately freed. */
-#define CLOG_STR_INFO_N(clg_ref, level, ...) CLOG_STR_AT_SEVERITY_N(clg_ref, 
CLG_SEVERITY_INFO, level, __VA_ARGS__)
-#define CLOG_STR_WARN_N(clg_ref, ...)        CLOG_STR_AT_SEVERITY_N(clg_ref, 
CLG_SEVERITY_WARN, 0, __VA_ARGS__)
-#define CLOG_STR_ERROR_N(clg_ref, ...)       CLOG_STR_AT_SEVERITY_N(clg_ref, 
CLG_SEVERITY_ERROR, 0, __VA_ARGS__)
-#define CLOG_STR_FATAL_N(clg_ref, ...)       CLOG_STR_AT_SEVERITY_N(clg_ref, 
CLG_SEVERITY_FATAL, 0, __VA_ARGS__)
+#define CLOG_STR_INFO_N(clg_ref, level, str) CLOG_STR_AT_SEVERITY_N(clg_ref, 
CLG_SEVERITY_INFO, level, str)
+#define CLOG_STR_WARN_N(clg_ref, str)        CLOG_STR_AT_SEVERITY_N(clg_ref, 
CLG_SEVERITY_WARN, 0, str)
+#define CLOG_STR_ERROR_N(clg_ref, str)       CLOG_STR_AT_SEVERITY_N(clg_ref, 
CLG_SEVERITY_ERROR, 0, str)
+#define CLOG_STR_FATAL_N(clg_ref, str)       CLOG_STR_AT_SEVERITY_N(clg_ref, 
CLG_SEVERITY_FATAL, 0, str)
 
 #ifdef __cplusplus
 }

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
https://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to