Files
sx/examples/1227-ffi-export-fn-rename.c
agra 66d9169e59 test(ffi-linkage): xfail export "csym" rename (Phase 2.2)
example/1227 exposes the sx fn `sx_triple` to C under the symbol `triple_c`
via `export "triple_c"`; the companion C calls `triple_c` by that name.
RED: the define path emits the fn under its sx name (`sx_triple`) and
ignores the parsed `extern_name`, so the C reference to `triple_c` is
undefined at AOT link. The next commit consumes the rename on the define
path (gap iii) and greens it.
2026-06-14 14:48:35 +03:00

9 lines
200 B
C

#include "1227-ffi-export-fn-rename.h"
// Defined on the sx side via `export "triple_c"` — a plain C-ABI symbol.
extern int triple_c(int n);
int call_triple(int n) {
return triple_c(n) + 1;
}