wasm events to list, wm_char
This commit is contained in:
@@ -62,6 +62,8 @@ typedef double f64;
|
||||
#define million(n) ((n)*1000000)
|
||||
#define billion(n) ((n)*1000000000)
|
||||
|
||||
#define zero_struct(x) memory_zero((x), sizeof(*(x)))
|
||||
|
||||
#define DEFER_LOOP(begin, end) for (i32 PASTE(_i_, __LINE__) = (begin, 0); !PASTE(_i_, __LINE__); PASTE(_i_, __LINE__) += (end, 1))
|
||||
#define STACK(type, size) struct { type data[size]; i32 len; }
|
||||
#define STACK_PUSH(stack, ...) (assert((stack).len < lengthof((stack).data)), (stack).data[(stack).len++] = __VA_ARGS__)
|
||||
|
||||
@@ -51,7 +51,10 @@ fn void core_init(void) {
|
||||
tcx._perm.data = memory;
|
||||
tcx._perm.commit = tcx._perm.reserve = memory_size;
|
||||
|
||||
ma_arena_t *perm = &tcx._perm;
|
||||
ma_push_arena_ex(&tcx._perm, &tcx.scratch[0], mib(1));
|
||||
ma_push_arena_ex(&tcx._perm, &tcx.scratch[1], kib(256));
|
||||
ma_push_arena_ex(&tcx._perm, &tcx.scratch[2], kib(64));
|
||||
|
||||
tcx.temp = ma_push_arena(perm, mib(2));
|
||||
}
|
||||
@@ -8,9 +8,9 @@ fn utf32_result_t utf16_to_utf32(uint16_t *c, int max_advance) {
|
||||
result.out_str = 0x10000;
|
||||
result.out_str += (uint32_t)(c[0] & 0x03FF) << 10u | (c[1] & 0x03FF);
|
||||
result.advance = 2;
|
||||
}
|
||||
else
|
||||
} else {
|
||||
result.error = 2;
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
|
||||
Reference in New Issue
Block a user