From f380f7aaf66d0fc39b9d47b93bd9ba3f69eef26e Mon Sep 17 00:00:00 2001 From: Pjotr Prins Date: Fri, 27 Jun 2025 11:12:56 +0200 Subject: Create gemmalib and get ready with a guile test --- src/gemma_api.cpp | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 src/gemma_api.cpp (limited to 'src/gemma_api.cpp') diff --git a/src/gemma_api.cpp b/src/gemma_api.cpp new file mode 100644 index 0000000..618f283 --- /dev/null +++ b/src/gemma_api.cpp @@ -0,0 +1,21 @@ +// Testing bindings, see README.md and +// https://www.gnu.org/savannah-checkouts/gnu/guile/docs/docs-2.0/guile-ref/Dynamic-Types.html + +#include +#include +#include +#include + +extern SCM my_incrementing_zig_function (SCM a, SCM flag); + +SCM my_incrementing_function (SCM a, SCM flag) +{ + SCM result; + + if (scm_is_true (flag)) + result = scm_sum (a, scm_from_int (1)); + else + result = a; + + return result; +} -- cgit v1.2.3