refactor: make interpreter portable with static pools and I/O hooks
Co-authored-by: aider (openrouter/moonshotai/kimi-k2.6) <aider@aider.chat>
This commit is contained in:
+1
-5
@@ -1,11 +1,7 @@
|
||||
#include "forth.h"
|
||||
|
||||
Word* add_primitive(const char* name, void (*code)(Word*), uint8_t flags) {
|
||||
Word* w = malloc(sizeof(Word));
|
||||
if (!w) {
|
||||
fprintf(stderr, "Out of memory\n");
|
||||
exit(1);
|
||||
}
|
||||
Word* w = forth_alloc_word();
|
||||
w->prev = dict_head;
|
||||
dict_head = w;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user