From 098f15860cb6473f18d0e46bb739e7798d4eff7d Mon Sep 17 00:00:00 2001 From: Leon Henrik Plickat Date: Fri, 29 Dec 2023 11:33:00 +0100 Subject: [PATCH] replace scm_c_primitive_load() with scm_primitive_load() The c version does not auto-compile scripts, the other version however does. --- riverguile.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/riverguile.c b/riverguile.c index aec6592..0871188 100644 --- a/riverguile.c +++ b/riverguile.c @@ -310,8 +310,14 @@ static void *load_script (void *data) { /* Note: All guile objects are garbage collected. */ - char *path = (char *)data; - (void)scm_c_primitive_load(path); + const char *path = (char *)data; + + /* scm_primitive_load_path() searches guiles load-path when encountering + * a relative path. That should never happen here though. + */ + assert(path[0] == '/'); + + scm_primitive_load_path(scm_from_utf8_string(path)); /* Check if the handler has been defined. */ SCM variable = scm_module_variable(