From 94a506876fbd0f91ee07be5353518ae9a617135d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Josef=20Pospi=CC=81s=CC=8Cil?= Date: Fri, 1 Jul 2022 12:23:25 +0200 Subject: [PATCH] Trace function to the stderr --- src/core/vm.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/core/vm.c b/src/core/vm.c index ae5f8de0..966d4941 100644 --- a/src/core/vm.c +++ b/src/core/vm.c @@ -220,14 +220,14 @@ /* Trace a function call */ static void vm_do_trace(JanetFunction *func, int32_t argc, const Janet *argv) { if (func->def->name) { - janet_printf("trace (%S", func->def->name); + janet_eprintf("trace (%S", func->def->name); } else { - janet_printf("trace (%p", janet_wrap_function(func)); + janet_eprintf("trace (%p", janet_wrap_function(func)); } for (int32_t i = 0; i < argc; i++) { - janet_printf(" %p", argv[i]); + janet_eprintf(" %p", argv[i]); } - janet_printf(")\n"); + janet_eprintf(")\n"); } /* Invoke a method once we have looked it up */