summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Mikkelsen <peter@pmikkelsen.com>2021-07-02 17:55:18 +0000
committerPeter Mikkelsen <peter@pmikkelsen.com>2021-07-02 17:55:18 +0000
commit8dd4f85c85aa9ab7a5f1219efd694e6707f2718c (patch)
treeb65df292c08edf0c3224fec2737df1ead17b926a
parentbe26a1ce93e3ed24e57d2e0916f09252536994cb (diff)
Fix Throw(What) macro
-rw-r--r--builtins.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/builtins.c b/builtins.c
index 0dabad0..ac2ef75 100644
--- 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; \