Finished garbage collector.

🎉
This commit is contained in:
Jacob Signorovitch 2025-06-14 09:23:49 -04:00
parent 80122b6572
commit abb8ff6b58
2 changed files with 3 additions and 2 deletions

View File

@ -190,7 +190,9 @@ void ast_call_data_destroy(ASTCallData* call) {
void ast_call_data_destroy_psv(ASTCallData* call) {
if (!call) return;
free(call->to);
call->to = NULL;
free(call->argv);
call->argv = NULL;
free(call);
}

View File

@ -7,7 +7,7 @@
#include <string.h>
HTab* htab_init() {
HTab* htab = malloc(sizeof(HTab));
HTab* htab = calloc(1, sizeof(HTab));
log_dbgf("HTAB %p", htab);
@ -31,7 +31,6 @@ void* htab_get(HTab* htab, char* key) {
void htab_ins(HTab* htab, char* key, void* data) {
size_t i = geti(key);
// assert((*htab)[i] == NULL);
(*htab)[i] = data;
log_dbgf("Inserted something to hash table @ index %lu", i);
}