diff options
Diffstat (limited to 'vm.c')
-rw-r--r-- | vm.c | 20 |
1 files changed, 10 insertions, 10 deletions
@@ -315,10 +315,10 @@ rb_vm_cref_new_toplevel(void) static void vm_cref_dump(const char *mesg, const rb_cref_t *cref) { - fprintf(stderr, "vm_cref_dump: %s (%p)\n", mesg, (void *)cref); + ruby_debug_printf("vm_cref_dump: %s (%p)\n", mesg, (void *)cref); while (cref) { - fprintf(stderr, "= cref| klass: %s\n", RSTRING_PTR(rb_class_path(CREF_CLASS(cref)))); + ruby_debug_printf("= cref| klass: %s\n", RSTRING_PTR(rb_class_path(CREF_CLASS(cref)))); cref = CREF_NEXT(cref); } } @@ -686,15 +686,15 @@ static VALUE check_env_value(const rb_env_t *env); static int check_env(const rb_env_t *env) { - fprintf(stderr, "---\n"); - fprintf(stderr, "envptr: %p\n", (void *)&env->ep[0]); - fprintf(stderr, "envval: %10p ", (void *)env->ep[1]); + fputs("---\n", stderr); + ruby_debug_printf("envptr: %p\n", (void *)&env->ep[0]); + ruby_debug_printf("envval: %10p ", (void *)env->ep[1]); dp(env->ep[1]); - fprintf(stderr, "ep: %10p\n", (void *)env->ep); + ruby_debug_printf("ep: %10p\n", (void *)env->ep); if (rb_vm_env_prev_env(env)) { - fprintf(stderr, ">>\n"); + fputs(">>\n", stderr); check_env_value(rb_vm_env_prev_env(env)); - fprintf(stderr, "<<\n"); + fputs("<<\n", stderr); } return 1; } @@ -2719,7 +2719,7 @@ get_param(const char *name, size_t default_value, size_t min_value) } result = (size_t)(((val -1 + RUBY_VM_SIZE_ALIGN) / RUBY_VM_SIZE_ALIGN) * RUBY_VM_SIZE_ALIGN); } - if (0) fprintf(stderr, "%s: %"PRIuSIZE"\n", name, result); /* debug print */ + if (0) ruby_debug_printf("%s: %"PRIuSIZE"\n", name, result); /* debug print */ return result; } @@ -3706,7 +3706,7 @@ Init_BareVM(void) rb_vm_t * vm = ruby_mimmalloc(sizeof(*vm)); rb_thread_t * th = ruby_mimmalloc(sizeof(*th)); if (!vm || !th) { - fprintf(stderr, "[FATAL] failed to allocate memory\n"); + fputs("[FATAL] failed to allocate memory\n", stderr); exit(EXIT_FAILURE); } MEMZERO(th, rb_thread_t, 1); |