mirror of
https://salsa.debian.org/dskoll/remind.git
synced 2026-04-21 16:52:58 +02:00
Add "const" function, which is the inverse of "nonconst"
This commit is contained in:
@@ -568,6 +568,10 @@ eval_builtin(expr_node *node, Value *locals, Value *ans, int *nonconst)
|
||||
/* All went well; copy the result destructively */
|
||||
(*ans) = info.retval;
|
||||
|
||||
/* Special case of const cunction */
|
||||
if (!strcmp(f->name, "const")) {
|
||||
*nonconst = 0;
|
||||
}
|
||||
/* Don't allow retval to be destroyed! */
|
||||
info.retval.type = ERR_TYPE;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user