From 567d1c932284bdd53c60937ff6f4ce4a63d104bf Mon Sep 17 00:00:00 2001 From: _ov4 Date: Sat, 17 Oct 2026 15:56:41 +0000 Subject: test(extern): call functions from a user C object Co-Authored-By: Claude Sonnet 5.5 --- tests/i/extern-c-object/lib.c | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 tests/i/extern-c-object/lib.c (limited to 'tests/i/extern-c-object/lib.c') diff --git a/tests/i/extern-c-object/lib.c b/tests/i/extern-c-object/lib.c new file mode 100644 index 0000000..568133d --- /dev/null +++ b/tests/i/extern-c-object/lib.c @@ -0,0 +1,10 @@ +#include +#include + +static int calls; + +int add3(int a, int b, int c) { return a + b + c; } +double scale(double x, int k) { return x * k; } +int name_length(const char *s) { return (int)strlen(s); } +int next_call(void) { return ++calls; } +void say(const char *s) { puts(s); } -- cgit v1.3.1-4-g156e