start working on oop runtime

This commit is contained in:
2025-06-22 19:00:03 +01:00
parent fcffdc9000
commit 74c71c3a1b
15 changed files with 122 additions and 53 deletions

View File

@@ -0,0 +1,30 @@
#ifndef HASHMAP_H
#define HASHMAP_H
#include <stdint.h>
#include <stdlib.h>
typedef struct ArgonObject ArgonObject;
struct node
{
uint64_t hash;
ArgonObject *key;
ArgonObject *val;
struct node *next;
};
struct hashmap
{
size_t size;
size_t count;
struct node **list;
};
struct hashmap *createHashmap(int size);
int hashCode(struct hashmap *t, uint64_t hash);
int hashmap_remove(struct hashmap *t, uint64_t hash);
void hashmap_insert(struct hashmap *t, uint64_t hash, ArgonObject* key, ArgonObject* val);
#endif // HASHMAP_H