shithub: pprolog

Download patch

ref: 8dd4f85c85aa9ab7a5f1219efd694e6707f2718c
parent: be26a1ce93e3ed24e57d2e0916f09252536994cb
author: Peter Mikkelsen <[email protected]>
date: Fri Jul 2 13:55:18 EDT 2021

Fix Throw(What) macro

--- a/builtins.c
+++ b/builtins.c
@@ -7,9 +7,8 @@
 #define BuiltinProto(name) int name(Term *, Term *, Goal **, Choicepoint **, Binding **)
 #define Match(X, Y) (runestrcmp(name, X) == 0 && arity == Y)
 #define Throw(What) do{\
-	Term *t = mkcompound(L"throw", 1, What); \
 	Goal *g = malloc(sizeof(Goal)); \
-	g->goal = t; \
+	g->goal = What; \
 	g->catcher = nil; \
 	g->next = *goals; \
 	*goals = g; \