Use newer catch and include hooks
authorDale P. Smith <dalepsmith@gmail.com>
Sat, 18 Jan 2020 19:38:36 +0000 (14:38 -0500)
committerClinton Ebadi <clinton@unknownlamer.org>
Fri, 8 May 2020 00:33:37 +0000 (20:33 -0400)
source/Interp.C

index 87dd48d..0e1870b 100644 (file)
@@ -26,6 +26,9 @@
 #endif
 
 #include <libguile.h>
+extern "C" {
+#include <libguile/hooks.h>
+}
 
 #include "Bot.H"
 #include "BotInterp.H"
@@ -43,7 +46,7 @@ SCM Interp::bot_module = 0;
 pthread_mutex_t Interp::mutex = PTHREAD_MUTEX_INITIALIZER;
 #endif
 
-typedef SCM (*SCMFunc)();
+typedef scm_t_subr SCMFunc;
 
 SCM
 Interp::ScmApplyWrapper (void *data)
@@ -85,7 +88,7 @@ Interp::EmptyHandler(void *data, SCM tag, SCM args)
 SCM
 Interp::LazyApplyWrapper(void *data)
 {
-  return scm_internal_lazy_catch(SCM_BOOL_T,
+  return scm_internal_catch(SCM_BOOL_T,
                                 (scm_t_catch_body) Interp::ScmApplyWrapper, 
                                 data,
                                 (scm_t_catch_handler) Interp::LazyHandler, 
@@ -96,7 +99,7 @@ Interp::LazyApplyWrapper(void *data)
 static SCM
 lazy_eval_file(char *filename)
 {
-  return scm_internal_lazy_catch(SCM_BOOL_T,
+  return scm_internal_catch(SCM_BOOL_T,
                                 (scm_t_catch_body) scm_c_primitive_load_path, 
                                 filename,
                                 (scm_t_catch_handler) Interp::LazyHandler, 0);
@@ -105,7 +108,7 @@ lazy_eval_file(char *filename)
 static SCM
 lazy_eval_string(char *str)
 {
-  return scm_internal_lazy_catch(SCM_BOOL_T,
+  return scm_internal_catch(SCM_BOOL_T,
                                 (scm_t_catch_body) scm_c_eval_string, str,
                                 (scm_t_catch_handler) Interp::LazyHandler, 0);
 }