all repos — hex @ 140ed1b832a4bd20b57b8f2967979ddce9010f35

A tiny, minimalist, slightly-esoteric concatenative programming lannguage.

Fixes.
h3rald h3rald@h3rald.com
Fri, 03 Jan 2025 15:51:18 +0000
commit

140ed1b832a4bd20b57b8f2967979ddce9010f35

parent

2152253d02206c0c9e70da62059253330e3cc47d

2 files changed, 6 insertions(+), 5 deletions(-)

jump to
M src/hex.hsrc/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.csrc/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; }