Fixes.
h3rald h3rald@h3rald.com
Fri, 03 Jan 2025 15:51:18 +0000
2 files changed,
6 insertions(+),
5 deletions(-)
M
src/hex.h
→
src/hex.h
@@ -22,8 +22,8 @@
// Constants #define HEX_VERSION "0.3.0" #define HEX_STDIN_BUFFER_SIZE 16384 -#define HEX_INITIAL_REGISTRY_SIZE 128 -#define HEX_REGISTRY_SIZE 1024 +#define HEX_INITIAL_REGISTRY_SIZE 512 +#define HEX_REGISTRY_SIZE 4096 #define HEX_STACK_SIZE 256 #define HEX_STACK_TRACE_SIZE 16 #define HEX_NATIVE_SYMBOLS 64
M
src/symbols.c
→
src/symbols.c
@@ -25,7 +25,6 @@ HEX_FREE(ctx, name);
HEX_FREE(ctx, value); return 1; } - if (name->type != HEX_TYPE_STRING) { hex_error(ctx, "[symbol :] Symbol name must be a string");@@ -2378,11 +2377,13 @@ HEX_FREE(ctx, evalResult);
break; } - for (size_t i = 0; i < action->quotation_size; i++) + hex_item_t *act = hex_copy_item(ctx, action); + for (size_t i = 0; i < act->quotation_size; i++) { - if (hex_push(ctx, action->data.quotation_value[i]) != 0) + if (hex_push(ctx, act->data.quotation_value[i]) != 0) { HEX_FREE(ctx, action); + HEX_FREE(ctx, act); HEX_FREE(ctx, condition); return 1; }