mirror of
https://github.com/krgamestudios/Toy.git
synced 2026-04-15 14:54:07 +10:00
WIP: Scopes weren't tracking their content sizes
'print' no longer segfaults from a long chain of indirect memory frees. It still doesn't work though, which is odd.
This commit is contained in:
@@ -11,18 +11,18 @@ typedef struct Toy_ScopeEntry {
|
||||
Toy_String key;
|
||||
Toy_Value value;
|
||||
Toy_ValueType type;
|
||||
unsigned int psl; //psl '0' means empty
|
||||
bool constant;
|
||||
unsigned int psl;
|
||||
} Toy_ScopeEntry;
|
||||
|
||||
//holds a table-like collection of variables TODO: check bitness
|
||||
typedef struct Toy_Scope {
|
||||
struct Toy_Scope* next;
|
||||
unsigned int refCount;
|
||||
Toy_ScopeEntry* data;
|
||||
unsigned int capacity;
|
||||
unsigned int count;
|
||||
unsigned int maxPsl;
|
||||
Toy_ScopeEntry* data;
|
||||
} Toy_Scope;
|
||||
|
||||
//handle deep scopes - the scope is stored in the bucket, not the table
|
||||
|
||||
Reference in New Issue
Block a user