diff options
author | Koichi Sasada <[email protected]> | 2021-12-28 17:58:39 +0900 |
---|---|---|
committer | Koichi Sasada <[email protected]> | 2021-12-29 00:22:02 +0900 |
commit | c9af8a32a05b26d45c5c8967902b3a724f3c1be6 (patch) | |
tree | 1ddf2e3ae5dd1998c7eff2c317223bc06f6db01b /vm_debug.h | |
parent | 763592d208883714f3d255eb5fb1bee649e9613b (diff) |
`USE_RUBY_DEBUG_LOG` doesn't check `RUBY_DEVEL`
`USE_RUBY_DEBUG_LOG` was only defined when `RUBY_DEVEL` is defined.
This patch removes this dependency (`USE_RUBY_DEBUG_LOG` is defined
independently from `RUBY_DEVEL`).
Do not commit a patch which enables `USE_RUBY_DEBUG_LOG`.
Notes
Notes:
Merged: https://github.com/ruby/ruby/pull/5366
Diffstat (limited to 'vm_debug.h')
-rw-r--r-- | vm_debug.h | 15 |
1 files changed, 2 insertions, 13 deletions
diff --git a/vm_debug.h b/vm_debug.h index 803a7ccf4b..f2c89a193b 100644 --- a/vm_debug.h +++ b/vm_debug.h @@ -31,20 +31,9 @@ void ruby_set_debug_option(const char *str); RUBY_SYMBOL_EXPORT_END -#ifndef RUBY_DEVEL -# define RUBY_DEVEL 0 -#endif - -#if RUBY_DEVEL #ifndef USE_RUBY_DEBUG_LOG #define USE_RUBY_DEBUG_LOG 0 #endif -#else -// disable on !RUBY_DEVEL -#ifdef USE_RUBY_DEBUG_LOG -#undef USE_RUBY_DEBUG_LOG -#endif -#endif /* RUBY_DEBUG_LOG: Logging debug information mechanism * @@ -101,7 +90,7 @@ bool ruby_debug_log_filter(const char *func_name); // 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 defined(USE_RUBY_DEBUG_LOG) && USE_RUBY_DEBUG_LOG +#if USE_RUBY_DEBUG_LOG # define RUBY_DEBUG_LOG_ENABLED(func_name) \ (ruby_debug_log_mode && ruby_debug_log_filter(func_name)) @@ -115,7 +104,7 @@ bool ruby_debug_log_filter(const char *func_name); ruby_debug_log(file, line, RUBY_FUNCTION_NAME_STRING, "" __VA_ARGS__); \ } while (0) -#else +#else // USE_RUBY_DEBUG_LOG // do nothing #define RUBY_DEBUG_LOG(...) #define RUBY_DEBUG_LOG2(file, line, ...) |