mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-03-21 09:51:41 +00:00
[util] Allow "any type" results for cexpr
Setting the result type cexpr_exprval tells cexpr to simply return whoe exprval object rather than the referenced value, thus allowing the caller to check the type when the expression is context sensitive.
This commit is contained in:
parent
35f12c36ff
commit
55104ac430
1 changed files with 4 additions and 0 deletions
|
@ -191,6 +191,10 @@ assign_expr (exprval_t *dst, const exprval_t *src, exprctx_t *context)
|
|||
if (!src) {
|
||||
return;
|
||||
}
|
||||
if (dst->type == &cexpr_exprval) {
|
||||
*(exprval_t **) dst->value = (exprval_t *) src;
|
||||
return;
|
||||
}
|
||||
binop = cexpr_find_cast (dst->type, src->type);
|
||||
if (binop && binop->op) {
|
||||
binop->func (dst, src, dst, context);
|
||||
|
|
Loading…
Reference in a new issue