mirror of
https://github.com/c3lang/c3c.git
synced 2026-02-27 12:01:16 +00:00
Use atexit to fix finalizers on Windows #1361.
This commit is contained in:
committed by
Christoffer Lerno
parent
45a94cfe86
commit
3ab201ce10
@@ -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());
|
||||
}
|
||||
|
||||
@@ -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()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user