mirror of
https://github.com/storytold/harfbuzz.git
synced 2026-11-24 16:31:14 +01:00
Replace safe pointer helpers that manufactured static mutable references with explicit unsafe reads/writes and a callback-scoped output iterator. Compute byte offsets in pointer width. Preserve direct batch writes for aligned, disjoint buffers; use stack outputs for unaligned, repeated, or overlapping slots without allocating or creating aliased references. Add unaligned nominal/advance, padding, repeated output, and in-place advance coverage. Tests: full Meson suite (281 passed, 1 skipped), font-only Clippy, and unchanged 144-case metric snapshots. Clippy used opt-level=0 for the nightly compiler workaround. Seven-run medians across 36 nominal/horizontal/vertical advance cases, compared again with the saved old library on one CPU, showed no slowdown: nominal about 6% faster, horizontal unchanged, vertical about 36% faster. Assisted-by: OpenAI Codex