Skip to content

Commit

Permalink
modify cgen to set tg_live_reload_info
Browse files Browse the repository at this point in the history
  • Loading branch information
spytheman committed Jan 3, 2025
1 parent 4531896 commit 644ce96
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions vlib/builtin/builtin.c.v
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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.
Expand Down
4 changes: 2 additions & 2 deletions vlib/v/gen/c/live.v
Original file line number Diff line number Diff line change
Expand Up @@ -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('')
Expand Down

0 comments on commit 644ce96

Please sign in to comment.