better nopsym
This commit is contained in:
parent
3bee2537bd
commit
83f85858ca
16
main.c
16
main.c
@ -6,16 +6,24 @@
|
||||
#define SLC_DEBUG
|
||||
#include "engine/slc.h"
|
||||
|
||||
symptr nopsym(SLC_SYM_OP op, slc_tmp_charptr key, symptr ptr) {
|
||||
symptr nopsym(SLC_SYM_OP op, do_not_save_charptr key, symptr ptr) {
|
||||
if(op == SLC_SYM_ERASE) {
|
||||
printf("SYM_ERASE\n");
|
||||
} else {
|
||||
if(op == SLC_SYM_GET) printf("SYM_GET:");
|
||||
if(op == SLC_SYM_SET) printf("SYM_SET:");
|
||||
printf(" %s", key.ptr);
|
||||
}
|
||||
|
||||
symptr ret;
|
||||
ret.worp = NULL;
|
||||
return ret;
|
||||
// TODO: Create a "peasantly" symbol table where we have:
|
||||
// - 32 length
|
||||
// - 32 previndex
|
||||
// - 32 nextindex
|
||||
// - char* name inline stored
|
||||
// - padding (divisible by 4)
|
||||
// - void* value;
|
||||
// - char name[]; // inline stored
|
||||
// - padding (divisible by 8)
|
||||
//
|
||||
// Then I can do a lookup basically via strstr-like (but 4byte steps!)
|
||||
// with first few characters zero-padded in the search term parameter
|
||||
|
Loading…
x
Reference in New Issue
Block a user