aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/gemma_api.cpp21
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;
+}