Move examples/*.sx and their expected/ snapshots into per-category subfolders (examples/<category>/...). Folder = leading filename token, with ffi-objc/ffi-jni kept whole; filenames are unchanged. The corpus runner and LSP sweep now discover each category's expected/ dir, while issues/ stays flat. Example 1058's repo-root-relative companion import is made file-relative. Path strings embedded in 164 snapshots were regenerated (path-only changes). Test-layout docs in CLAUDE.md updated.
14 lines
508 B
C
14 lines
508 B
C
// Companion to examples/101-ffi-medium-struct.sx — a single
|
|
// roundtrip through a 16-byte integer-only struct. Pinned in a
|
|
// dedicated example because integer aggregates in this size class
|
|
// route through emit_llvm.zig's `[2 x i64]` ABI coercion slot, a
|
|
// different path from the small (≤8 B) integer struct, the 16-byte
|
|
// HFA, and the >16 B byval-pointer cases.
|
|
|
|
typedef struct { long long a; long long b; } Pair64;
|
|
|
|
Pair64 ffi_pair64_swap(Pair64 p) {
|
|
Pair64 r = { p.b, p.a };
|
|
return r;
|
|
}
|