Skip to content

Commit 5f8922a

Browse files
committed
Merge branch 'master' of ssh://git.code.sf.net/p/gretl/git
2 parents 25e3375 + d30e3d1 commit 5f8922a

File tree

1 file changed

+8
-10
lines changed

1 file changed

+8
-10
lines changed

lib/src/geneval.c

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -16651,10 +16651,9 @@ static NODE *query_eval_scalar (double x, NODE *n, parser *p)
1665116651
return ret;
1665216652
}
1665316653

16654-
/* The following allows for @n to hold a scalar, real matrix
16655-
or complex matrix, and also allows for the case where
16656-
@n's payload is real-valued but a complex result is required,
16657-
signalled by @need_z.
16654+
/* The following allows for @n to hold a scalar, real matrix or
16655+
complex matrix, and also allows for the case where @n's payload is
16656+
real-valued but a complex result is required, signalled by @need_z.
1665816657
*/
1665916658

1666016659
static int query_term_get_value (NODE *n, int i, int j,
@@ -16825,12 +16824,11 @@ static NODE *eval_query (NODE *t, NODE *c, parser *p)
1682516824
} else if (c->t == SERIES) {
1682616825
ret = query_eval_series(c->v.xvec, t, p);
1682716826
} else if (c->t == MAT) {
16828-
if (0 /* gretl_matrix_is_scalar(c->v.m) */) {
16829-
/* Watch out! This breaks compilation. */
16830-
ret = query_eval_scalar(c->v.m->val[0], t, p);
16831-
} else {
16832-
ret = query_eval_matrix(c->v.m, t, p);
16833-
}
16827+
/* note: at one point we had here special handling for
16828+
the case where the @c matrix is 1 x 1, but this
16829+
resulted in breakage elsewhere
16830+
*/
16831+
ret = query_eval_matrix(c->v.m, t, p);
1683416832
} else {
1683516833
/* invalid type for boolean condition */
1683616834
p->err = e_types(c);

0 commit comments

Comments
 (0)