aboutsummaryrefslogtreecommitdiff
path: root/src/compile/functions.c
diff options
context:
space:
mode:
authorBruce Hill <bruce@bruce-hill.com>2025-11-30 14:12:01 -0500
committerBruce Hill <bruce@bruce-hill.com>2025-11-30 14:12:01 -0500
commit4d8aa867c7f4661167a4742fbdd865ed2449503e (patch)
tree67c9aeedaa3eb36585d1747e1f96e8c4708fc707 /src/compile/functions.c
parentd302aaec38b9d295d39c4d87b53ee610bc9e0e07 (diff)
Add `base` parameter to integer parsing functions
Diffstat (limited to 'src/compile/functions.c')
-rw-r--r--src/compile/functions.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/compile/functions.c b/src/compile/functions.c
index cce93e3d..63d7d23d 100644
--- a/src/compile/functions.c
+++ b/src/compile/functions.c
@@ -6,6 +6,7 @@
#include "../stdlib/datatypes.h"
#include "../stdlib/integers.h"
#include "../stdlib/nums.h"
+#include "../stdlib/optionals.h"
#include "../stdlib/tables.h"
#include "../stdlib/text.h"
#include "../stdlib/util.h"
@@ -703,7 +704,7 @@ Text_t compile_function(env_t *env, Text_t name_code, ast_t *ast, Text_t *static
definition = Texts(definition, wrapper);
} else if (cache && cache->tag == Int) {
assert(args);
- OptionalInt64_t cache_size = Int64$parse(Text$from_str(Match(cache, Int)->str), NULL);
+ OptionalInt64_t cache_size = Int64$parse(Text$from_str(Match(cache, Int)->str), NONE_INT, NULL);
Text_t pop_code = EMPTY_TEXT;
if (cache->tag == Int && cache_size.has_value && cache_size.value > 0) {
// FIXME: this currently just deletes the first entry, but this