Skip to content

Commit

Permalink
coroutines: fix dealloc (called wrong fn)
Browse files Browse the repository at this point in the history
  • Loading branch information
joe-conigliaro committed Oct 9, 2023
1 parent 9604a3f commit b3ac88e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion vlib/coroutines/coroutines.v
Expand Up @@ -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)
}
}
Expand Down

0 comments on commit b3ac88e

Please sign in to comment.