lang: rename signed integer types sN -> iN
Surface rename of the signed integer family: s1..s64 become i1..i64
(u1..u64, usize, isize unchanged). 'string' keeps the s-prefix arm in
name classification; width parsing moves to the i-prefix arm next to
isize.
Internal TypeId tags follow the surface (.s8/.s16/.s32/.s64 ->
.i8/.i16/.i32/.i64), as do mono-key mangle fragments (ptr_i64,
tu_i64_bool) and all display/diagnostic formatting (i{d}).
Migrated in the same sweep: stdlib + examples + issue repros + FFI C
companions (shared symbol names like ffi_id_i64), expected
stdout/stderr/ir snapshots, specs.md, readme.md, CLAUDE.md/AGENTS.md,
implementation_plan.md, docs/, issue writeups. Vendored stb_image and
historical flow state left untouched.
zig build test: 426/426; examples suite: 595/595.
This commit is contained in:
@@ -11,7 +11,7 @@
|
||||
|
||||
g_sdl_plat : *SdlPlatform = null;
|
||||
|
||||
chdir :: (path: [*]u8) -> s32 #foreign;
|
||||
chdir :: (path: [*]u8) -> i32 #foreign;
|
||||
SDL_GetBasePath :: () -> [*]u8 #foreign;
|
||||
|
||||
// A macOS `.app` launched via Finder / `open` starts with CWD=`/`, so a
|
||||
@@ -26,7 +26,7 @@ sdl_chdir_to_bundle :: () {
|
||||
bp := SDL_GetBasePath();
|
||||
if bp == null { return; }
|
||||
// Reorient only when the base path lives inside a `.app` bundle.
|
||||
i : s64 = 0;
|
||||
i : i64 = 0;
|
||||
found := false;
|
||||
while bp[i] != 0 {
|
||||
if bp[i] == 46 and bp[i + 1] == 97 and bp[i + 2] == 112 and bp[i + 3] == 112 {
|
||||
@@ -43,10 +43,10 @@ SdlPlatform :: struct {
|
||||
gl_ctx: *void = null;
|
||||
running: bool = true;
|
||||
|
||||
width: s32 = 0;
|
||||
height: s32 = 0;
|
||||
pixel_w: s32 = 0;
|
||||
pixel_h: s32 = 0;
|
||||
width: i32 = 0;
|
||||
height: i32 = 0;
|
||||
pixel_w: i32 = 0;
|
||||
pixel_h: i32 = 0;
|
||||
dpi_scale: f32 = 1.0;
|
||||
|
||||
delta_time: f32 = 0.008;
|
||||
@@ -59,7 +59,7 @@ SdlPlatform :: struct {
|
||||
}
|
||||
|
||||
impl Platform for SdlPlatform {
|
||||
init :: (self: *SdlPlatform, title: [:0]u8, w: s32, h: s32) -> bool {
|
||||
init :: (self: *SdlPlatform, title: [:0]u8, w: i32, h: i32) -> bool {
|
||||
self.running = true;
|
||||
self.has_frame_closure = false;
|
||||
self.delta_time = 0.008;
|
||||
@@ -178,8 +178,8 @@ impl Platform for SdlPlatform {
|
||||
self.last_perf = current;
|
||||
|
||||
inline if OS == .wasm {
|
||||
new_w : s32 = 0;
|
||||
new_h : s32 = 0;
|
||||
new_w : i32 = 0;
|
||||
new_h : i32 = 0;
|
||||
SDL_GetWindowSize(self.window, @new_w, @new_h);
|
||||
if new_w != self.width or new_h != self.height {
|
||||
self.width = new_w;
|
||||
|
||||
Reference in New Issue
Block a user