summaryrefslogtreecommitdiff
path: root/debug.c
diff options
context:
space:
mode:
authorakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-06-13 22:57:41 +0000
committerakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-06-13 22:57:41 +0000
commit436b02b3322d6809c2bf4cbadbe8b324a53e07e4 (patch)
tree545da3945e02e22b954ebe4653f947206f4bf37f /debug.c
parent4641b801664008c7ae509a79354da1bc84b6fc1c (diff)
downloadruby-436b02b3322d6809c2bf4cbadbe8b324a53e07e4.tar.gz
* gc.c (ruby_initial_gc_stress): defined.
(ruby_initial_gc_stress_ptr): defined. * debug.c (set_debug_option): use ruby_initial_gc_stress_ptr for gc_stress option. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17154 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'debug.c')
-rw-r--r--debug.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/debug.c b/debug.c
index 3ec7da4c05..3699359193 100644
--- a/debug.c
+++ b/debug.c
@@ -141,13 +141,13 @@ set_debug_option(const char *str, int len, void *arg)
#define SET_WHEN(name, var) do { \
if (len == sizeof(name) - 1 && \
strncmp(str, name, len) == 0) { \
- extern int ruby_##var; \
- ruby_##var = 1; \
+ extern int var; \
+ var = 1; \
return; \
} \
} while (0)
- SET_WHEN("gc_stress", gc_stress);
- SET_WHEN("core", enable_coredump);
+ SET_WHEN("gc_stress", *ruby_initial_gc_stress_ptr);
+ SET_WHEN("core", ruby_enable_coredump);
fprintf(stderr, "unexpected debug option: %.*s\n", len, str);
}