Skip to content

Commit ddc7e34

Browse files
committed
veb: global app fix
1 parent e5d88de commit ddc7e34

3 files changed

Lines changed: 3 additions & 3 deletions

File tree

‎vlib/veb/veb.v‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ fn run_at_with_ssl[A, X](mut global_app A, params RunParams) ! {
131131
ssl_listener.shutdown() or {}
132132
}
133133
ssl_params := &SslRequestParams{
134-
global_app: unsafe { global_app }
134+
global_app: unsafe { voidptr(&global_app) }
135135
controllers_sorted: controllers_sorted
136136
routes: &routes
137137
benchmark_page_generation: params.benchmark_page_generation

‎vlib/veb/veb_d_new_veb.v‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ pub fn run_new[A, X](mut global_app A, params RunParams) ! {
3737

3838
// Allocate params on the heap to keep it valid for the server lifetime
3939
request_params := &RequestParams{
40-
global_app: global_app
40+
global_app: unsafe { voidptr(&global_app) }
4141
controllers_sorted: controllers_sorted
4242
routes: &routes
4343
benchmark_page_generation: params.benchmark_page_generation

‎vlib/veb/veb_picoev.v‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ $if !new_veb ? {
3232
flush_stdout()
3333
routes_ptr := &routes
3434
mut pico_context := &RequestParams{
35-
global_app: unsafe { global_app }
35+
global_app: unsafe { voidptr(&global_app) }
3636
controllers: controllers_sorted
3737
routes: routes_ptr
3838
timeout_in_seconds: params.timeout_in_seconds

0 commit comments

Comments
 (0)