mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* 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
This commit is contained in:
parent
4641b80166
commit
436b02b332
3 changed files with 16 additions and 4 deletions
8
debug.c
8
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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue