From 644ce96fb879e987d56686f9a12b129e3da79fae Mon Sep 17 00:00:00 2001 From: Delyan Angelov Date: Fri, 3 Jan 2025 12:26:17 +0200 Subject: [PATCH] modify cgen to set tg_live_reload_info --- vlib/builtin/builtin.c.v | 4 ++-- vlib/v/gen/c/live.v | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/vlib/builtin/builtin.c.v b/vlib/builtin/builtin.c.v index 11a24a6512de65..6a40a4a6b1184e 100644 --- a/vlib/builtin/builtin.c.v +++ b/vlib/builtin/builtin.c.v @@ -69,7 +69,7 @@ fn panic_debug(line_no int, file string, mod string, fn_name string, s string) { eprint(' function: '); eprint(fn_name); eprintln('()') eprint(' message: '); eprintln(s) eprint(' file: '); eprint(file); eprint(':'); - C.fprintf(C.stderr, c'%d\n', line_no) + C.fprintf(C.stderr, c'%d\n', line_no) eprint(' v hash: '); eprintln(@VCURRENTHASH) eprintln('=========================================') // vfmt on @@ -768,7 +768,7 @@ __global g_main_argc = int(0) @[markused] __global g_main_argv = unsafe { nil } -@[markused] +@[markused; export: 'g_live_reload_info'] __global g_live_reload_info = unsafe { nil } // arguments returns the command line arguments, used for starting the current program as a V array of strings. diff --git a/vlib/v/gen/c/live.v b/vlib/v/gen/c/live.v index 5bf52521dea620..7eef1b5efeec80 100644 --- a/vlib/v/gen/c/live.v +++ b/vlib/v/gen/c/live.v @@ -107,9 +107,9 @@ fn (mut g Gen) generate_hotcode_reloading_main_caller() { idx++ } g.writeln('') - // g_live_info gives access to the LiveReloadInfo methods, + // g_live_reload_info gives access to the LiveReloadInfo methods, // to the custom user code, through calling v_live_info() - g.writeln('\t\tg_live_info = (void*)live_info;') + g.writeln('\t\tg_live_reload_info = (void*)live_info;') g.writeln('\t\tv__live__executable__start_reloader(live_info);') g.writeln('\t}\t// end of live code initialization section') g.writeln('')