Use atexit to fix finalizers on Windows #1361.

This commit is contained in:
Christoffer Lerno
2024-09-14 15:21:00 +02:00
committed by Christoffer Lerno
parent 45a94cfe86
commit 3ab201ce10
7 changed files with 37 additions and 6 deletions

View File

@@ -2,8 +2,8 @@ import std::io;
fn void main()
{
Path path = path::getcwd()!!;
foreach (i, p : path::ls(path)!!)
Path path = path::new_cwd()!!;
foreach (i, p : path::new_ls(path)!!)
{
io::printfn("%02d %s", i, p.str_view());
}

View File

@@ -2,6 +2,12 @@ module test;
import std::io;
import std::collections::map;
import std::os;
import libc;
fn void bye() @finalizer
{
libc::puts("Bye from finalizer!");
}
fn void test1()
{