diff options
author | Nobuyoshi Nakada <[email protected]> | 2021-10-03 16:22:53 +0900 |
---|---|---|
committer | Nobuyoshi Nakada <[email protected]> | 2021-10-20 11:22:33 +0900 |
commit | 0c15752556513f99c5275c8ca05808221eb56248 () | |
tree | d1e7af1ddba2822cfd78fbdef6e13129a1e2d494 /vm_debug.h | |
parent | 768ceb4ead2c1a78b2af047e8f54f2472b34e849 (diff) |
Use `RUBY_FUNCTION_NAME_STRING` for old Visual C++
Probably `__func__` is supported since Visual C++ 2015 (= 14.0, `_MSC_VER` = 1900).
-rw-r--r-- | vm_debug.h | 12 |
1 files changed, 7 insertions, 5 deletions
@@ -94,18 +94,20 @@ bool ruby_debug_log_filter(const char *func_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__, __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__); \ } 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__); \ } while (0) #else |