projects
/
pspp-builds.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
First step in making struct variable opaque: the boring mechanical
[pspp-builds.git]
/
src
/
language
/
expressions
/
parse.c
diff --git
a/src/language/expressions/parse.c
b/src/language/expressions/parse.c
index 0c89be63be1daf290298dee99564b8c9f97476bf..6489ed8381c0eacd3273268000c93b697be812be 100644
(file)
--- a/
src/language/expressions/parse.c
+++ b/
src/language/expressions/parse.c
@@
-901,7
+901,7
@@
parse_vector_element (struct lexer *lexer, struct expression *e)
|| !lex_match (lexer, ')'))
return NULL;
|| !lex_match (lexer, ')'))
return NULL;
- return expr_allocate_binary (e, (v
ector->var[0]->type == NUMERIC
+ return expr_allocate_binary (e, (v
ar_is_numeric (vector->var[0])
? OP_VEC_ELEM_NUM : OP_VEC_ELEM_STR),
element, expr_allocate_vector (e, vector));
}
? OP_VEC_ELEM_NUM : OP_VEC_ELEM_STR),
element, expr_allocate_vector (e, vector));
}
@@
-1464,7
+1464,7
@@
union any_node *
expr_allocate_variable (struct expression *e, struct variable *v)
{
union any_node *n = pool_alloc (e->expr_pool, sizeof n->variable);
expr_allocate_variable (struct expression *e, struct variable *v)
{
union any_node *n = pool_alloc (e->expr_pool, sizeof n->variable);
- n->type = v
->type == NUMERIC
? OP_num_var : OP_str_var;
+ n->type = v
ar_is_numeric (v)
? OP_num_var : OP_str_var;
n->variable.v = v;
return n;
}
n->variable.v = v;
return n;
}
@@
-1484,6
+1484,6
@@
static union any_node *
allocate_unary_variable (struct expression *e, struct variable *v)
{
assert (v != NULL);
allocate_unary_variable (struct expression *e, struct variable *v)
{
assert (v != NULL);
- return expr_allocate_unary (e, v
->type == NUMERIC
? OP_NUM_VAR : OP_STR_VAR,
+ return expr_allocate_unary (e, v
ar_is_numeric (v)
? OP_NUM_VAR : OP_STR_VAR,
expr_allocate_variable (e, v));
}
expr_allocate_variable (e, v));
}