зеркало из https://github.com/github/ruby.git
compile.c: remove side effects by debug macros
* compile.c (debugp_param): do not evaluate arguments of debug macros, unless the debug mode is enabled. these macros should not have side effects. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58253 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
Родитель
0be01189c7
Коммит
42c13d386c
22
compile.c
22
compile.c
|
@ -150,23 +150,11 @@ struct iseq_compile_data_ensure_node_stack {
|
|||
|
||||
#else
|
||||
|
||||
static inline ID
|
||||
r_id(ID id)
|
||||
{
|
||||
return id;
|
||||
}
|
||||
|
||||
static inline VALUE
|
||||
r_value(VALUE value)
|
||||
{
|
||||
return value;
|
||||
}
|
||||
|
||||
#define debugi(header, id) r_id(id)
|
||||
#define debugp(header, value) r_value(value)
|
||||
#define debugp_verbose(header, value) r_value(value)
|
||||
#define debugp_verbose_node(header, value) r_value(value)
|
||||
#define debugp_param(header, value) r_value(value)
|
||||
#define debugi(header, id) ((void)0)
|
||||
#define debugp(header, value) ((void)0)
|
||||
#define debugp_verbose(header, value) ((void)0)
|
||||
#define debugp_verbose_node(header, value) ((void)0)
|
||||
#define debugp_param(header, value) ((void)0)
|
||||
#define debug_node_start(node) ((void)0)
|
||||
#define debug_node_end() ((void)0)
|
||||
#endif
|
||||
|
|
Загрузка…
Ссылка в новой задаче