diff options
author | Pjotr Prins | 2025-06-27 11:12:56 +0200 |
---|---|---|
committer | Pjotr Prins | 2025-06-27 11:12:56 +0200 |
commit | f380f7aaf66d0fc39b9d47b93bd9ba3f69eef26e (patch) | |
tree | 5bc549d8e52f9f187c4ff7d6911a2ba4c3336070 /src/gemma_api.cpp | |
parent | d7972ab1179cb051de99d67a5c907f201458cef6 (diff) | |
download | pangemma-f380f7aaf66d0fc39b9d47b93bd9ba3f69eef26e.tar.gz |
Create gemmalib and get ready with a guile test
Diffstat (limited to 'src/gemma_api.cpp')
-rw-r--r-- | src/gemma_api.cpp | 21 |
1 files changed, 21 insertions, 0 deletions
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 <stdio.h> +#include <libguile.h> +#include <libguile/boolean.h> +#include <libguile/numbers.h> + +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; +} |