summaryrefslogtreecommitdiff
path: root/gc.h
diff options
context:
space:
mode:
authorNobuyoshi Nakada <nobu@ruby-lang.org>2021-09-09 23:21:06 +0900
committerNobuyoshi Nakada <nobu@ruby-lang.org>2021-09-11 08:41:32 +0900
commitcd829bb078e6a3486d9b5ea57fc5111d289c1860 (patch)
treef1c903880d0ed454250f95d95a6e6d765a899796 /gc.h
parent967b9743faac0b55a3d8deb176a08fdff449bba8 (diff)
Remove printf family from the mjit header
Linking printf family functions makes mjit objects to link unnecessary code.
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/4820
Diffstat (limited to 'gc.h')
-rw-r--r--gc.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/gc.h b/gc.h
index 5d113cafce..63c60f5765 100644
--- a/gc.h
+++ b/gc.h
@@ -35,7 +35,7 @@ extern int ruby_gc_debug_indent;
static inline void
rb_gc_debug_indent(void)
{
- printf("%*s", ruby_gc_debug_indent, "");
+ ruby_debug_printf("%*s", ruby_gc_debug_indent, "");
}
static inline void
@@ -45,7 +45,7 @@ rb_gc_debug_body(const char *mode, const char *msg, int st, void *ptr)
ruby_gc_debug_indent--;
}
rb_gc_debug_indent();
- printf("%s: %s %s (%p)\n", mode, st ? "->" : "<-", msg, ptr);
+ ruby_debug_printf("%s: %s %s (%p)\n", mode, st ? "->" : "<-", msg, ptr);
if (st) {
ruby_gc_debug_indent++;
@@ -58,7 +58,7 @@ rb_gc_debug_body(const char *mode, const char *msg, int st, void *ptr)
#define RUBY_MARK_LEAVE(msg) rb_gc_debug_body("mark", (msg), 0, ptr)
#define RUBY_FREE_ENTER(msg) rb_gc_debug_body("free", (msg), 1, ptr)
#define RUBY_FREE_LEAVE(msg) rb_gc_debug_body("free", (msg), 0, ptr)
-#define RUBY_GC_INFO rb_gc_debug_indent(); printf
+#define RUBY_GC_INFO rb_gc_debug_indent(), ruby_debug_printf
#else
#define RUBY_MARK_ENTER(msg)