From 37f83755f658aa36cba1fc017b06b26552a01a22 Mon Sep 17 00:00:00 2001 From: Eshel Yaron Date: Thu, 1 Sep 2022 16:47:30 +0300 Subject: [PATCH] PORT: detect older swipl and disable custom GMP alloc functions --- sweep.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/sweep.c b/sweep.c index 188ada6..2aa5522 100644 --- a/sweep.c +++ b/sweep.c @@ -426,7 +426,12 @@ sweep_initialize(emacs_env *env, ptrdiff_t nargs, emacs_value *args, void *data) return NULL; } } + + if (PL_version_info(PL_VERSION_SYSTEM < 80516)) + PL_action(PL_GMP_SET_ALLOC_FUNCTIONS, FALSE); + r = PL_initialise(nargs, argv); + for (i = 0; i < nargs; i++) { free(argv[i]); } -- 2.39.2