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`.
This commit is contained in:
Koichi Sasada 2021-12-28 17:58:39 +09:00
parent 763592d208
commit c9af8a32a0
Notes: git 2021-12-29 00:22:28 +09:00
5 changed files with 8 additions and 25 deletions

10
debug.c
View file

@ -248,11 +248,7 @@ set_debug_option(const char *str, int len, void *arg)
}
}
#ifdef USE_RUBY_DEBUG_LOG
STATIC_ASSERT(USE_RUBY_DEBUG_LOG, USE_RUBY_DEBUG_LOG ? RUBY_DEVEL : 1);
#endif
#if RUBY_DEVEL
#if USE_RUBY_DEBUG_LOG
static void setup_debug_log(void);
#else
#define setup_debug_log()
@ -265,7 +261,7 @@ ruby_set_debug_option(const char *str)
setup_debug_log();
}
#if RUBY_DEVEL
#if USE_RUBY_DEBUG_LOG
// RUBY_DEBUG_LOG features
// See vm_debug.h comments for details.
@ -511,4 +507,4 @@ ruby_debug_log_dump(const char *fname, unsigned int n)
fclose(fp);
}
}
#endif // #if RUBY_DEVEL
#endif // #if USE_RUBY_DEBUG_LOG