From a6bb0f7d19677939f023aadb9ca7b49cc325a347 Mon Sep 17 00:00:00 2001 From: Ben Sima Date: Sun, 13 Nov 2022 18:49:55 -0500 Subject: Add test for building guile extensions Guile linking was first implemented in d8fe6f7ac54f155fe5a3c33509249a70d0c816c5. This test remained uncommitted since then because I wanted a better way to test it, but I couldn't figure out another way to test it, so here we are. --- Biz/Bild/Bessel.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 Biz/Bild/Bessel.c (limited to 'Biz/Bild/Bessel.c') diff --git a/Biz/Bild/Bessel.c b/Biz/Bild/Bessel.c new file mode 100644 index 0000000..524956c --- /dev/null +++ b/Biz/Bild/Bessel.c @@ -0,0 +1,19 @@ +// : dep guile-3.0 +// : lib libbessel-guile +// : arg -shared +// : arg -fPIC + +#include +#include + +SCM +j0_wrapper(SCM x) +{ + return scm_from_double(j0(scm_to_double(x))); +} + +void +init_bessel() +{ + scm_c_define_gsubr("j0", 1, 0, 0, j0_wrapper); +} -- cgit v1.2.3