This commit is contained in:
Judah Caruso 2026-02-20 00:03:43 -07:00
parent 1f7d8fdb54
commit cbfeddce3a
2 changed files with 4 additions and 5 deletions

2
do.ps1
View file

@ -114,7 +114,7 @@ function GetFlags($os, $release) {
$flags += " $LINUX_FLAGS $BLOCKS_RT_FLAGS -DPLATFORM_LINUX";
}
"emscripten" {
$flags += " $WASM_FLAGS $BLOCKS_RT_FLAGS -DPLATFORM_WASM -DPOINTER_32"
$flags += " $WASM_FLAGS $BLOCKS_RT_FLAGS -DPLATFORM_WASM -DARCH_32"
}
default {
Write-Error "Unsupported operating system '$os'";

View file

@ -23,7 +23,7 @@ typedef signed _BitInt(128) s128;
typedef float f32;
typedef double f64;
#if POINTER_32
#if ARCH_32
typedef u32 uaddr;
typedef s32 saddr;
@ -43,9 +43,9 @@ static_assert(sizeof(uaddr) == sizeof(void*), "uaddr was not equal to a pointer"
typedef struct { u8* data; uword count; } string;
#define string_const(S) (string){ .data = (S), .count = count_of((S)) }
#define string_from(P) (string){ .data = (P), .count = cast(uword, strlen((P))) }
#define string_from_count(P, C) (string){ .data = (P), .count = (C) }
#define string_from_const(S) (string){ .data = (S), .count = count_of((S)) }
#define string_with_count(P, C) (string){ .data = (P), .count = (C) }
#define size_of(T) cast(uword, sizeof(T))
#define ssize_of(T) cast(sword, sizeof(T))
@ -77,4 +77,3 @@ static inline void __scope_exit_run(__scope_exit *blk) { (*blk)(); }
#define scope_exit \
__attribute__((cleanup(__scope_exit_run), unused)) \
__scope_exit __concat(_defer_, __LINE__) = ^void(void)