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

ruby-changes:70580

From: Nobuyoshi <ko1@a...>
Date: Sat, 25 Dec 2021 18:04:36 +0900 (JST)
Subject: [ruby-changes:70580] 975a6efd7e (master): Suppress undef warnings for USE_RUBY_DEBUG_LOG

https://git.ruby-lang.org/ruby.git/commit/?id=975a6efd7e

From 975a6efd7ea144275d4774d18ff0f568c1a1dc97 Mon Sep 17 00:00:00 2001
From: Nobuyoshi Nakada <nobu@r...>
Date: Sat, 25 Dec 2021 17:09:19 +0900
Subject: Suppress undef warnings for USE_RUBY_DEBUG_LOG

---
 ractor.c         | 2 +-
 transient_heap.c | 2 +-
 vm_debug.h       | 2 +-
 vm_sync.h        | 2 +-
 4 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/ractor.c b/ractor.c
index d6559dfc2af..3c05964e911 100644
--- a/ractor.c
+++ b/ractor.c
@@ -545,7 +545,7 @@ ractor_sleep_interrupt(void *ptr) https://github.com/ruby/ruby/blob/trunk/ractor.c#L545
     RACTOR_UNLOCK(r);
 }
 
-#if USE_RUBY_DEBUG_LOG
+#if defined(USE_RUBY_DEBUG_LOG) && USE_RUBY_DEBUG_LOG
 static const char *
 wait_status_str(enum ractor_wait_status wait_status)
 {
diff --git a/transient_heap.c b/transient_heap.c
index c14cf146135..c3df2634911 100644
--- a/transient_heap.c
+++ b/transient_heap.c
@@ -748,7 +748,7 @@ transient_heap_block_evacuate(struct transient_heap* theap, struct transient_hea https://github.com/ruby/ruby/blob/trunk/transient_heap.c#L748
     }
 }
 
-#if USE_RUBY_DEBUG_LOG
+#if defined(USE_RUBY_DEBUG_LOG) && USE_RUBY_DEBUG_LOG
 static const char *
 transient_heap_status_cstr(enum transient_heap_status status)
 {
diff --git a/vm_debug.h b/vm_debug.h
index fa70de334d3..803a7ccf4b6 100644
--- a/vm_debug.h
+++ b/vm_debug.h
@@ -101,7 +101,7 @@ bool ruby_debug_log_filter(const char *func_name); https://github.com/ruby/ruby/blob/trunk/vm_debug.h#L101
 // You can use this macro for temporary usage (you should not commit it).
 #define _RUBY_DEBUG_LOG(...) ruby_debug_log(__FILE__, __LINE__, RUBY_FUNCTION_NAME_STRING, "" __VA_ARGS__)
 
-#if USE_RUBY_DEBUG_LOG
+#if defined(USE_RUBY_DEBUG_LOG) && USE_RUBY_DEBUG_LOG
 # define RUBY_DEBUG_LOG_ENABLED(func_name) \
     (ruby_debug_log_mode && ruby_debug_log_filter(func_name))
 
diff --git a/vm_sync.h b/vm_sync.h
index 4d83b5e52cb..0969e5bfc9c 100644
--- a/vm_sync.h
+++ b/vm_sync.h
@@ -4,7 +4,7 @@ https://github.com/ruby/ruby/blob/trunk/vm_sync.h#L4
 #include "vm_debug.h"
 #include "debug_counter.h"
 
-#if USE_RUBY_DEBUG_LOG
+#if defined(USE_RUBY_DEBUG_LOG) && USE_RUBY_DEBUG_LOG
 #define LOCATION_ARGS const char *file, int line
 #define LOCATION_PARAMS file, line
 #define APPEND_LOCATION_ARGS , const char *file, int line
-- 
cgit v1.2.1


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

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