#include "mirror.h"

const void* mirror_get_typeclass(void* self, IMirror const* tc, const char* typeclass) {
    uintptr_t target_hash = strhash(typeclass);
    list_foreach(MirroredTypeclass*, class, tc->get_typeclasses(self)) {
        if(target_hash == class->name_hash && strcmp(typeclass, class->typeclass_name) == 0)
            return class->typeclass;
    }
    return NULL;
}
