summaryrefslogtreecommitdiff
path: root/debug.c
diff options
context:
space:
mode:
authorakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-11-18 14:58:03 (GMT)
committerakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-11-18 14:58:03 (GMT)
commit714fd78f6721f0c6df58d2fefae6b016424d317e (patch)
tree836ded65aa1096f038176acc17bff2c78f37fbd4 /debug.c
parent8463a90871adaf82a31e598943ae3762a5a666aa (diff)
* debug.c (SET_WHEN): Don't declare debug variables here.
ruby_initial_gc_stress_ptr is changed int* to VALUE* at r41406. * internal.h (ruby_initial_gc_stress_ptr): Declared. (ruby_enable_coredump): Ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48477 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'debug.c')
-rw-r--r--debug.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/debug.c b/debug.c
index 15c1ea8..4eaae0d 100644
--- a/debug.c
+++ b/debug.c
@@ -140,18 +140,17 @@ ruby_debug_breakpoint(void)
static void
set_debug_option(const char *str, int len, void *arg)
{
-#define SET_WHEN(name, var) do { \
+#define SET_WHEN(name, var, val) do { \
if (len == sizeof(name) - 1 && \
strncmp(str, (name), len) == 0) { \
- extern int var; \
- var = 1; \
+ (var) = (val); \
return; \
} \
} while (0)
- SET_WHEN("gc_stress", *ruby_initial_gc_stress_ptr);
- SET_WHEN("core", ruby_enable_coredump);
+ SET_WHEN("gc_stress", *ruby_initial_gc_stress_ptr, Qtrue);
+ SET_WHEN("core", ruby_enable_coredump, 1);
#if defined _WIN32 && defined _MSC_VER && _MSC_VER >= 1400
- SET_WHEN("rtc_error", ruby_w32_rtc_error);
+ SET_WHEN("rtc_error", ruby_w32_rtc_error, 1);
#endif
fprintf(stderr, "unexpected debug option: %.*s\n", len, str);
}