mirror of
https://github.com/c3lang/c3c.git
synced 2026-02-27 12:01:16 +00:00
Complete transition to fn. Introduce global/threadlocal
This commit is contained in:
committed by
Christoffer Lerno
parent
e2621617f1
commit
b52b42d4da
@@ -1,16 +1,16 @@
|
||||
// #target: x64-darwin
|
||||
|
||||
module demo;
|
||||
define Callback = func int(char* text, int value);
|
||||
define Callback = fn int(char* text, int value);
|
||||
|
||||
func int my_callback(char* text, int value)
|
||||
fn int my_callback(char* text, int value)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
Callback cb = &my_callback;
|
||||
|
||||
func void main()
|
||||
fn void main()
|
||||
{
|
||||
int result = cb("demo", 123);
|
||||
// ..
|
||||
|
||||
Reference in New Issue
Block a user