summaryrefslogtreecommitdiff
path: root/uscript/val.c
diff options
context:
space:
mode:
authoriamcheeseman <[email protected]>2026-04-25 19:14:55 -0400
committeriamcheeseman <[email protected]>2026-04-25 19:14:55 -0400
commitb8db294d0c843084a20cd7b6c2f087ba6edce530 (patch)
treee6e0e1ae19827f49c7500b3e563c20433a94f11f /uscript/val.c
parentf328d3b2bea11f6b89bf4b3707205ecd8496b93d (diff)
microscript: rename zilch to nadaHEADmaster
Diffstat (limited to 'uscript/val.c')
-rw-r--r--uscript/val.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/uscript/val.c b/uscript/val.c
index 9df040a..fcce61a 100644
--- a/uscript/val.c
+++ b/uscript/val.c
@@ -95,7 +95,7 @@ struct us_upval *create_upval(struct us_val *val)
{
struct us_upval *upval = mem_alloc(sizeof(struct us_upval));
upval->loc = val;
- upval->closed = create_zilch();
+ upval->closed = create_nada();
upval->next = NULL;
init_obj(wrap_upval(upval), &upval->header);
return upval;
@@ -146,7 +146,7 @@ void free_val(struct us_val v)
break;
case VAL_NUM:
case VAL_BOOL:
- case VAL_ZILCH:
+ case VAL_NADA:
break;
}
}
@@ -166,7 +166,7 @@ bool vals_eql(struct us_val a, struct us_val b)
switch (a.type) {
case VAL_NUM: return get_num(a) == get_num(b);
case VAL_BOOL: return get_bool(a) == get_bool(b);
- case VAL_ZILCH: return true;
+ case VAL_NADA: return true;
case VAL_STR: {
struct us_str *a_str = get_str(a);
struct us_str *b_str = get_str(b);
@@ -207,12 +207,12 @@ char *val_to_str(struct us_val v, int *len_out)
*len_out = strlen(bool_str);
return str;
}
- case VAL_ZILCH: {
- const char *zilch_str = "zilch";
- char *str = mem_alloc(strlen(zilch_str) + 1);
- strcpy(str, zilch_str);
+ case VAL_NADA: {
+ const char *nada_str = "nada";
+ char *str = mem_alloc(strlen(nada_str) + 1);
+ strcpy(str, nada_str);
if (len_out)
- *len_out = strlen(zilch_str);
+ *len_out = strlen(nada_str);
return str;
}
case VAL_STR: {
@@ -296,7 +296,7 @@ char *val_to_str(struct us_val v, int *len_out)
bool val_as_bool(struct us_val v)
{
- if (v.type == VAL_ZILCH)
+ if (v.type == VAL_NADA)
return false;
if (v.type == VAL_BOOL)
return get_bool(v);