Compiler game work + enable cast from pointer to int

This commit is contained in:
Krzosa Karol
2023-04-18 13:50:57 +02:00
parent 013db0f985
commit 4ecb329033
7 changed files with 153 additions and 45 deletions

View File

@@ -1,10 +1,12 @@
size_t :: U64 // @todo(Krzosa): Need this type
long :: #strict int // @todo(Krzosa): Need this type
malloc :: #foreign (size: size_t): *void
realloc :: #foreign (ptr: *void, size: size_t): *void
free :: #foreign (ptr: *void)
memcpy :: #foreign (dst: *void, src: *void, size: size_t): *void
memmove :: #foreign (dst: *void, src: *void, size: size_t): *void
FILE :: #strict U64 // Doesnt matter the type just handle
fopen :: #foreign (file: *char, mode: *char): *FILE
fclose :: #foreign (file: *FILE): int
@@ -15,8 +17,3 @@ fread :: #foreign (buffer: *void, element_size: size_t, element_count: size_t, s
SEEK_CUR :: 1
SEEK_END :: 2
SEEK_SET :: 0
Triple :: struct($A: Type, $B: Type, $C: Type)
a: A
b: B
c: C