[前][次][番号順一覧][スレッド一覧]

ruby-changes:68539

From: Nobuyoshi <ko1@a...>
Date: Wed, 20 Oct 2021 08:00:51 +0900 (JST)
Subject: [ruby-changes:68539] 8bf33a6fbb (master): Ensure the format argument of RUBY_DEBUG_LOG is a string literal

https://git.ruby-lang.org/ruby.git/commit/?id=8bf33a6fbb

From 8bf33a6fbbad99882a77d5374d461bd870ce2ef2 Mon Sep 17 00:00:00 2001
From: Nobuyoshi Nakada <nobu@r...>
Date: Sun, 3 Oct 2021 00:54:27 +0900
Subject: Ensure the format argument of RUBY_DEBUG_LOG is a string literal

---
 vm_debug.h | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/vm_debug.h b/vm_debug.h
index 8f7027224d..a2647273a0 100644
--- a/vm_debug.h
+++ b/vm_debug.h
@@ -94,18 +94,18 @@ bool ruby_debug_log_filter(const char *func_name); https://github.com/ruby/ruby/blob/trunk/vm_debug.h#L94
 
 // convenient macro to log even if the USE_RUBY_DEBUG_LOG macro is not specified.
 // You can use this macro for temporary usage (you should not commit it).
-#define _RUBY_DEBUG_LOG(...) ruby_debug_log(__FILE__, __LINE__, __func__, __VA_ARGS__)
+#define _RUBY_DEBUG_LOG(...) ruby_debug_log(__FILE__, __LINE__, __func__, "" __VA_ARGS__)
 
 #if USE_RUBY_DEBUG_LOG
 
 #define RUBY_DEBUG_LOG(...) do { \
   if (ruby_debug_log_mode && ruby_debug_log_filter(__func__)) \
-    ruby_debug_log(__FILE__, __LINE__, __func__, __VA_ARGS__); \
+    ruby_debug_log(__FILE__, __LINE__, __func__, "" __VA_ARGS__); \
 } while (0)
 
 #define RUBY_DEBUG_LOG2(file, line, ...) do { \
   if (ruby_debug_log_mode && ruby_debug_log_filter(__func__)) \
-    ruby_debug_log(file, line, __func__, __VA_ARGS__); \
+    ruby_debug_log(file, line, __func__, "" __VA_ARGS__); \
 } while (0)
 
 #else
-- 
cgit v1.2.1


--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]