diff --git a/src/trealla b/src/trealla index ec1d63e..568fa27 160000 --- a/src/trealla +++ b/src/trealla @@ -1 +1 @@ -Subproject commit ec1d63e14c9beef6513a3fe01e24394284e1ecab +Subproject commit 568fa271a8143eac2b1b21409f6503b1984caf59 diff --git a/trealla/answer.go b/trealla/answer.go index f876507..d5e2ca2 100644 --- a/trealla/answer.go +++ b/trealla/answer.go @@ -21,7 +21,7 @@ type Answer struct { type response struct { Answer - Result queryStatus + Status queryStatus Error json.RawMessage // ball } @@ -68,7 +68,7 @@ func (pl *prolog) parse(goal, stdout, stderr string) (Answer, error) { return resp.Answer, fmt.Errorf("trealla: decoding error: %w", err) } - switch resp.Result { + switch resp.Status { case statusSuccess: return resp.Answer, nil case statusFailure: @@ -80,7 +80,7 @@ func (pl *prolog) parse(goal, stdout, stderr string) (Answer, error) { } return resp.Answer, ErrThrow{Query: goal, Ball: ball, Stdout: output, Stderr: stderr} default: - return resp.Answer, fmt.Errorf("trealla: unexpected query status: %v", resp.Result) + return resp.Answer, fmt.Errorf("trealla: unexpected query status: %v", resp.Status) } } diff --git a/trealla/libtpl.wasm b/trealla/libtpl.wasm index c5e0823..9ea70d2 100755 Binary files a/trealla/libtpl.wasm and b/trealla/libtpl.wasm differ diff --git a/trealla/query.go b/trealla/query.go index 372d96d..bcf1b17 100644 --- a/trealla/query.go +++ b/trealla/query.go @@ -106,7 +106,7 @@ func (pl *prolog) start(ctx context.Context, goal string, options ...QueryOption ch <- fmt.Errorf("trealla: panic: %v", ex) } }() - v, err := pl.pl_query(pl.ptr, goalstr.ptr, subqptr) + v, err := pl.pl_query(pl.ptr, goalstr.ptr, subqptr, 0) if err == nil { ret = v.(int32) }