mirror of
https://github.com/logos-messaging/nim-ffi.git
synced 2026-08-06 15:03:32 +00:00
Avoid magic ret-code integers in the generated callback helpers. The C trampolines already reference NIMFFI_RET_STALE_WARN; mirror that in the other two backends: define the canonical NIMFFI_RET_* set once in the C++ header prelude (guarded so a mixed TU keeps a single definition) and emit module-level NIMFFI_RET_* consts in the Rust crate, then use the named constants for the stale-warn, ok, and missing-callback checks instead of 3/0/2. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>