mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Ensure the format argument of RUBY_DEBUG_LOG is a string literal
This commit is contained in:
parent
9b18f1bffe
commit
8bf33a6fbb
1 changed files with 3 additions and 3 deletions
|
@ -94,18 +94,18 @@ 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__)
|
||||
#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
|
||||
|
|
Loading…
Add table
Reference in a new issue