summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorYukihiro "Matz" Matsumoto <[email protected]>2017-04-05 12:38:38 +0900
committerYukihiro "Matz" Matsumoto <[email protected]>2017-04-05 12:38:38 +0900
commit7f37c2fc57f7126b856265d9189fb91f2263eeb8 (patch)
tree3c3b0aa4df2262c178d31997db114051ac816ee6
parent74712c73ac9471fd388d76b0f12229ec428d5146 (diff)
downloadmruby-7f37c2fc57f7126b856265d9189fb91f2263eeb8.tar.gz
mruby-7f37c2fc57f7126b856265d9189fb91f2263eeb8.zip
Use stderr for debug prints in DEBUG(); fix #3584
-rw-r--r--src/gc.c2
-rw-r--r--src/vm.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/gc.c b/src/gc.c
index 391da84cb..872b9db3e 100644
--- a/src/gc.c
+++ b/src/gc.c
@@ -701,7 +701,7 @@ mrb_gc_mark(mrb_state *mrb, struct RBasic *obj)
static void
obj_free(mrb_state *mrb, struct RBasic *obj, int end)
{
- DEBUG(printf("obj_free(%p,tt=%d)\n",obj,obj->tt));
+ DEBUG(fprintf(stderr, "obj_free(%p,tt=%d)\n",obj,obj->tt));
switch (obj->tt) {
/* immediate - no mark */
case MRB_TT_TRUE:
diff --git a/src/vm.c b/src/vm.c
index bb4023da2..1db82eeb1 100644
--- a/src/vm.c
+++ b/src/vm.c
@@ -1809,7 +1809,7 @@ RETRY_TRY_BLOCK:
return v;
}
pc = ci->pc;
- DEBUG(printf("from :%s\n", mrb_sym2name(mrb, ci->mid)));
+ DEBUG(fprintf(stderr, "from :%s\n", mrb_sym2name(mrb, ci->mid)));
proc = mrb->c->ci->proc;
irep = proc->body.irep;
pool = irep->pool;