From b8db294d0c843084a20cd7b6c2f087ba6edce530 Mon Sep 17 00:00:00 2001 From: iamcheeseman Date: Sat, 25 Apr 2026 19:14:55 -0400 Subject: microscript: rename zilch to nada --- uscript/val.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'uscript/val.c') 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); -- cgit v1.3-2-g0d8e