mirror of
https://github.com/c3lang/c3c.git
synced 2026-02-27 12:01:16 +00:00
- Added path::home_directory, path::documents_directory, path::videos_directory, path::pictures_directory, path::desktop_directory, path::screenshots_directory,
`path::public_share_directory`, `path::templates_directory`, `path::saved_games_directory`, `path::music_directory`, `path::downloads_directory`. Fix codegen bug in expressions like `foo(x()) ?? io::EOF?` causing irregular crashes.
This commit is contained in:
committed by
Christoffer Lerno
parent
cbd415881b
commit
69b3263a00
@@ -1,10 +1,5 @@
|
||||
module hello_world;
|
||||
import std;
|
||||
import bar;
|
||||
import clib;
|
||||
import clib2;
|
||||
import std::core::env;
|
||||
|
||||
import std, bar, clib, clib2;
|
||||
|
||||
fn int test_doubler(int x) @if(env::WIN32) => x * x;
|
||||
extern fn int test_doubler(int) @if(!env::WIN32);
|
||||
@@ -18,6 +13,10 @@ fn int main()
|
||||
printf("Author emails:");
|
||||
io::printn(env::AUTHOR_EMAILS);
|
||||
|
||||
(void)io::printfn("Home dir: %s", path::home_directory(tmem));
|
||||
(void)io::printfn("Desktop dir: %s", path::desktop_directory(tmem));
|
||||
(void)io::printfn("Documents dir: %s", path::documents_directory(tmem));
|
||||
|
||||
bar::test();
|
||||
printf("Hello double: %d\n", test_doubler(11));
|
||||
if ($feature(ABCD)) io::printn("ABCD");
|
||||
|
||||
Reference in New Issue
Block a user