coroutines: fix dealloc (called wrong fn)

This commit is contained in:
Joe Conigliaro 2023-10-09 16:58:57 +11:00
parent 9604a3f491
commit b3ac88efe5
No known key found for this signature in database
GPG key ID: C12F7136C08206F1

View file

@ -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)
}
}