aboutsummaryrefslogtreecommitdiff
path: root/src/compile/functions.c
diff options
context:
space:
mode:
authorBruce Hill <bruce@bruce-hill.com>2025-10-01 13:40:29 -0400
committerBruce Hill <bruce@bruce-hill.com>2025-10-01 13:40:29 -0400
commit597699243a6f935231ad83e63d22bf6ff9e4e547 (patch)
treeedd50fcdad4324680d9e2df7beeaaf93fb162938 /src/compile/functions.c
parent1b307918c9f0ee6cf3dd074e0b9d9db1ffd35fb8 (diff)
For structs and fixed-size ints, use `.has_value` instead of `.is_none`
Diffstat (limited to 'src/compile/functions.c')
-rw-r--r--src/compile/functions.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/compile/functions.c b/src/compile/functions.c
index a1bc15ae..40e16e48 100644
--- a/src/compile/functions.c
+++ b/src/compile/functions.c
@@ -712,7 +712,7 @@ Text_t compile_function(env_t *env, Text_t name_code, ast_t *ast, Text_t *static
assert(args);
OptionalInt64_t cache_size = Int64$parse(Text$from_str(Match(cache, Int)->str), NULL);
Text_t pop_code = EMPTY_TEXT;
- if (cache->tag == Int && !cache_size.is_none && cache_size.value > 0) {
+ if (cache->tag == Int && cache_size.has_value && cache_size.value > 0) {
// FIXME: this currently just deletes the first entry, but this
// should be more like a least-recently-used cache eviction policy
// or least-frequently-used