diff options
author | Peter Mikkelsen <peter@pmikkelsen.com> | 2021-07-22 19:18:33 +0000 |
---|---|---|
committer | Peter Mikkelsen <peter@pmikkelsen.com> | 2021-07-22 19:18:33 +0000 |
commit | 77c7fea4cee74562ad60c7ce96ca830a7ebda8b7 (patch) | |
tree | 708b9ab3076a6c2a727b4303711ef90a242b367f /builtins.c | |
parent | 2bda2a9d61ff3c713beff623aceea143d0f814c6 (diff) |
Use addgoals to add the goal in catch/3 to the goalstack, allowing mod:pred goals too
Diffstat (limited to 'builtins.c')
-rw-r--r-- | builtins.c | 8 |
1 files changed, 1 insertions, 7 deletions
@@ -622,13 +622,7 @@ builtincatch(Term *goal, Binding **bindings, Module *module) catchframe->next = goalstack; goalstack = catchframe; - Goal *g = gmalloc(sizeof(Goal)); - g->goal = catchgoal; - g->module = module; - g->catcher = nil; - g->next = goalstack; - goalstack = g; - + goalstack = addgoals(goalstack, catchgoal, module); return 1; } |