aboutsummaryrefslogtreecommitdiffstats
path: root/vm_debug.h
diff options
context:
space:
mode:
authorKazuhiro NISHIYAMA <zn@mbf.nifty.com>2022-06-09 09:30:56 +0900
committerKazuhiro NISHIYAMA <zn@mbf.nifty.com>2022-06-09 09:35:08 +0900
commit67a9845a7a447ddfe0f21a8ce9ab0a8309c7e2d7 (patch)
treef3b98e6ad138672d82ddc96413c97a51b353f142 /vm_debug.h
parent9b7208fca16e6eb1c4c5938dad2417db49c941d0 (diff)
downloadruby-67a9845a7a447ddfe0f21a8ce9ab0a8309c7e2d7.tar.gz
Fix compile error
``` compiling ../debug.c ../debug.c:452:1: error: conflicting types for 'ruby_debug_log_filter' ruby_debug_log_filter(const char *func_name, const char *file_name) ^ ../vm_debug.h:87:6: note: previous declaration is here bool ruby_debug_log_filter(const char *func_name); ^ 1 error generated. make: *** [debug.o] Error 1 ```
Diffstat (limited to 'vm_debug.h')
-rw-r--r--vm_debug.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/vm_debug.h b/vm_debug.h
index f2c89a193b..ead1c7c10a 100644
--- a/vm_debug.h
+++ b/vm_debug.h
@@ -84,23 +84,23 @@ extern enum ruby_debug_log_mode {
RBIMPL_ATTR_FORMAT(RBIMPL_PRINTF_FORMAT, 4, 5)
void ruby_debug_log(const char *file, int line, const char *func_name, const char *fmt, ...);
void ruby_debug_log_print(unsigned int n);
-bool ruby_debug_log_filter(const char *func_name);
+bool ruby_debug_log_filter(const char *func_name, const char *file_name);
// 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__, RUBY_FUNCTION_NAME_STRING, "" __VA_ARGS__)
#if USE_RUBY_DEBUG_LOG
-# define RUBY_DEBUG_LOG_ENABLED(func_name) \
- (ruby_debug_log_mode && ruby_debug_log_filter(func_name))
+# define RUBY_DEBUG_LOG_ENABLED(func_name, file_name) \
+ (ruby_debug_log_mode && ruby_debug_log_filter(func_name, file_name))
#define RUBY_DEBUG_LOG(...) do { \
- if (RUBY_DEBUG_LOG_ENABLED(RUBY_FUNCTION_NAME_STRING)) \
+ if (RUBY_DEBUG_LOG_ENABLED(RUBY_FUNCTION_NAME_STRING, __FILE__)) \
ruby_debug_log(__FILE__, __LINE__, RUBY_FUNCTION_NAME_STRING, "" __VA_ARGS__); \
} while (0)
#define RUBY_DEBUG_LOG2(file, line, ...) do { \
- if (RUBY_DEBUG_LOG_ENABLED(RUBY_FUNCTION_NAME_STRING)) \
+ if (RUBY_DEBUG_LOG_ENABLED(RUBY_FUNCTION_NAME_STRING, __FILE__)) \
ruby_debug_log(file, line, RUBY_FUNCTION_NAME_STRING, "" __VA_ARGS__); \
} while (0)