From a3be36960661a9d4c857c9c38797cc7f0690a71a Mon Sep 17 00:00:00 2001 From: Gabriel Schneider Date: Fri, 20 Nov 2026 15:03:12 -0300 Subject: macos: the State field runtime is callbacks, as its type became macos.Callbacks (P37): runtime/macos.zig's field, pardes_init's and initCore's parameter, the store of it, its six readers (st.callbacks.set_clipboard, read_clipboard, wakeup and their userdata) and six test literals; abi/pardes.h's pardes_init prototype names its parameter callbacks (the typedef already did); the Swift locals that build the struct and hand it in, `var runtime` and `&runtime` -> `callbacks` at dev/macos/Sources/AppDelegate.swift:135 and :171 and test/macos_e2e.swift:171 and :203 (not built here: the Swift app needs macOS; by reading the name meets nothing in either scope); the prose "the runtime" (the host app, macos.zig:135, :264) stays; the ABI guard (unit-test -Dplatform=macos, "pardes.h matches the Zig boundary") 2/2 on Linux; gate on the stack through this change and the docking vocabulary (load 4-32): tui core-test 871/1028 (157 skipped), shell-test 1070/1073, pane-test 183/184, term-test 17/17, kitty-test 45/45, behaviour-test 275/275 and --replay 275/275, consumer-test passes, addon-test 5/5, process-test 0 of 144 (tty boot: msg failed once at load 32 and passed alone), replicas --clients 5 and --bytes --clients 5: diverged 0, unequal 0, deltas wrong 0, quiet checks differed 0, unlisted stops 0, corpus 22 of 22, no leak; the semantics word a73794ff9e03f814 as on merge40; daemon.py --far, --games, --window-clients pass, plain fails 2 of 4 at "client C agrees with a shell's output" (a timeout), as merge40's build does 3 of 6; the macOS library (x86_64-linux, aarch64-macos, the ABI guard 2/2) and the FreeBSD cross-build build; frames 77/77, gui unit-test 1666/1670 (the perf check's BaselineHarnessMismatch), perfab corpus2x +0.054% (noise 0.054%), the 121 per-operation counts within 0.1% against tree2 (key-down on medium 10,039,720 and render on medium 11,454,636, merge40's gate 10,039,703 and 11,454,619) Co-Authored-By: Claude Opus Claude-Session: https://claude.ai/code/session_016Y9MNBECMWcJD5pdS4SR6T --- dev/macos/Sources/AppDelegate.swift | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'dev/macos/Sources') diff --git a/dev/macos/Sources/AppDelegate.swift b/dev/macos/Sources/AppDelegate.swift index 4168999f..5ee775cf 100644 --- a/dev/macos/Sources/AppDelegate.swift +++ b/dev/macos/Sources/AppDelegate.swift @@ -132,7 +132,7 @@ final class AppDelegate: NSObject, NSApplicationDelegate, PardesViewDelegate { // to change the day macos_min_version reaches 14. NSApp.activate(ignoringOtherApps: true) - var runtime = pardes_callbacks_s( + var callbacks = pardes_callbacks_s( userdata: Unmanaged.passUnretained(self).toOpaque(), wakeup: { ud in // A pty reader thread. Every other function in pardes.h is @@ -168,7 +168,7 @@ final class AppDelegate: NSObject, NSApplicationDelegate, PardesViewDelegate { // greeting until it has seen a size, so a correction sent afterwards // arrives with the first prompt already wrapped to the wrong width. let grid = view.gridSize - let rc = pardes_init(&runtime, grid.cols, grid.rows) + let rc = pardes_init(&callbacks, grid.cols, grid.rows) if rc != 0 { NSLog("pardes: the core failed to boot at \(grid.cols)x\(grid.rows), pardes_init returned \(rc)") // Not NSApp.terminate — that runs applicationWillTerminate, which -- cgit v1.3