Function pointers are working

This commit is contained in:
nub31
2025-06-08 15:54:36 +02:00
parent 535bb1bf38
commit de071808e6
10 changed files with 165 additions and 152 deletions

View File

@@ -1,21 +1,21 @@
namespace c
extern func printf(fmt: ^u8, ...args: any): void
extern func getchar(): i32
extern func puts(fmt: ^u8)
// extern func printf(fmt: ^u8, ...args: any): void
// extern func getchar(): i32
extern func puts(fmt: []u8)
extern func malloc(size: i64): ^void
extern func calloc(num: i64, size: i64): ^void
extern func realloc(ptr: ^void, size: i64): ^void
extern func free(ptr: ^void)
// extern func malloc(size: i64): ^void
// extern func calloc(num: i64, size: i64): ^void
// extern func realloc(ptr: ^void, size: i64): ^void
// extern func free(ptr: ^void)
extern func sin(x: f64): f64
extern func cos(x: f64): f64
extern func tan(x: f64): f64
extern func sqrt(x: f64): f64
extern func pow(x: f64, y: f64): f64
extern func abs(x: i32): i32
// extern func sin(x: f64): f64
// extern func cos(x: f64): f64
// extern func tan(x: f64): f64
// extern func sqrt(x: f64): f64
// extern func pow(x: f64, y: f64): f64
// extern func abs(x: i32): i32
extern func time(t: ^i64): i64
extern func clock(): i64
extern func sleep(seconds: u32): i32
// extern func time(t: ^i64): i64
// extern func clock(): i64
// extern func sleep(seconds: u32): i32