safety push
This commit is contained in:
@@ -1,9 +1,20 @@
|
||||
#include "dictionaryClass.h"
|
||||
#include <string.h>
|
||||
#include "garbageCollector.h"
|
||||
#include "intClass.h"
|
||||
|
||||
u8 dictOneStrOneAll[] = { StringClass, VARARGCOUNT };
|
||||
|
||||
void addVariableToDict(Variable_t *dict, char* name, Variable_t *add){
|
||||
Dict_t a = {.name = CpyStr(name), .var = add};
|
||||
vecAdd(&dict->dictionary.vector, a);
|
||||
}
|
||||
|
||||
void addIntToDict(Variable_t *dict, char* name, s64 integer){
|
||||
Variable_t *v = newIntVariablePtr(integer);
|
||||
addVariableToDict(dict, name, v);
|
||||
}
|
||||
|
||||
Dict_t* getEntry(Vector_t *v, char* name) {
|
||||
vecForEach(Dict_t*, dict, v) {
|
||||
if (!strcmp(name, dict->name)) {
|
||||
|
||||
Reference in New Issue
Block a user