* 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
This commit is contained in:
akr 2014-11-18 14:58:03 +00:00
Родитель 8463a90871
Коммит 714fd78f67
3 изменённых файлов: 15 добавлений и 6 удалений

Просмотреть файл

@ -1,3 +1,11 @@
Tue Nov 18 23:45:52 2014 Tanaka Akira <akr@fsij.org>
* 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.
Tue Nov 18 18:06:43 2014 Tanaka Akira <akr@fsij.org>
* include/ruby/io.h (FMODE_WSPLIT): Removed. The write() system call

11
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);
}

Просмотреть файл

@ -645,6 +645,7 @@ NORETURN(void rb_syserr_fail_path_in(const char *func_name, int err, VALUE path)
#endif
/* gc.c */
extern VALUE *ruby_initial_gc_stress_ptr;
void Init_heap(void);
void *ruby_mimmalloc(size_t size);
void ruby_mimfree(void *ptr);
@ -911,6 +912,7 @@ long rb_reg_search0(VALUE, VALUE, long, int, int);
void rb_backref_set_string(VALUE string, long pos, long len);
/* signal.c */
extern int ruby_enable_coredump;
int rb_get_next_signal(void);
int rb_sigaltstack_size(void);