From b3ac88efe501c9b34fca0505654ee4650bae5001 Mon Sep 17 00:00:00 2001 From: Joe Conigliaro Date: Mon, 9 Oct 2023 16:58:57 +1100 Subject: [PATCH] coroutines: fix dealloc (called wrong fn) --- vlib/coroutines/coroutines.v | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vlib/coroutines/coroutines.v b/vlib/coroutines/coroutines.v index 98a79a39fece71..98f36f862ef148 100644 --- a/vlib/coroutines/coroutines.v +++ b/vlib/coroutines/coroutines.v @@ -31,7 +31,7 @@ fn init() { } dealloc := fn (_ voidptr, stack_ptr voidptr, stack_size int) { unsafe { - C.GC_add_roots(stack_ptr, charptr(stack_ptr) + stack_size) + C.GC_remove_roots(stack_ptr, charptr(stack_ptr) + stack_size) free(stack_ptr) } }