diff --git a/engine/slc.h b/engine/slc.h index 34f8965..077ce5c 100644 --- a/engine/slc.h +++ b/engine/slc.h @@ -162,12 +162,6 @@ enum SLC_IO_OP { }; typedef enum SLC_IO_OP SLC_IO_OP; -union symptr { - uint32_t *varp; - word *worp; -}; -typedef union symptr symptr; - struct do_not_save_charptr { char *ptr; }; @@ -189,7 +183,7 @@ typedef struct do_not_save_charptr do_not_save_charptr; * @param ptr When adding a found word/variable to the symbol table, the key will point to this word* or uint32_t* * @returns The word/var definition stored for the key, or NULL when it is not stored yet or op is SET and there was an error. */ -typedef symptr (*sym)(SLC_SYM_OP op, do_not_save_charptr key, symptr ptr); +typedef void* (*sym)(SLC_SYM_OP op, do_not_save_charptr key, void *ptr); /** * Function-abstraction for an integer "stack". diff --git a/main.c b/main.c index 197c9f7..8a7709c 100644 --- a/main.c +++ b/main.c @@ -6,7 +6,7 @@ #define SLC_DEBUG #include "engine/slc.h" -symptr nopsym(SLC_SYM_OP op, do_not_save_charptr key, symptr ptr) { +void *nopsym(SLC_SYM_OP op, do_not_save_charptr key, void *ptr) { if(op == SLC_SYM_ERASE) { printf("SYM_ERASE\n"); } else { @@ -15,9 +15,7 @@ symptr nopsym(SLC_SYM_OP op, do_not_save_charptr key, symptr ptr) { printf(" %s", key.ptr); } - symptr ret; - ret.worp = NULL; - return ret; + return NULL; // TODO: Create a "peasantly" symbol table where we have: // - 32 previndex // - 32 nextindex