aboutsummaryrefslogtreecommitdiff
path: root/types.c
diff options
context:
space:
mode:
authorBruce Hill <bruce@bruce-hill.com>2024-03-19 14:22:03 -0400
committerBruce Hill <bruce@bruce-hill.com>2024-03-19 14:22:03 -0400
commitadbb07fdc27af677923fb5453b845c7cd7b135a7 (patch)
tree490caac013b97a49545487c956b8586b82ceeb9c /types.c
parent7b444cd8249c933fb24e5195d9c511156f8b22f4 (diff)
Module imports
Diffstat (limited to 'types.c')
-rw-r--r--types.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/types.c b/types.c
index e37a3b90..4bc7e85b 100644
--- a/types.c
+++ b/types.c
@@ -58,6 +58,9 @@ CORD type_to_cord(type_t *t) {
case TypeInfoType: {
return CORD_all("TypeInfo(", Match(t, TypeInfoType)->name, ")");
}
+ case ModuleType: {
+ return CORD_all("Module(", Match(t, ModuleType)->name, ")");
+ }
default: {
raise(SIGABRT);
return CORD_asprintf("Unknown type: %d", t->tag);
@@ -410,6 +413,7 @@ size_t type_size(type_t *t)
return size;
}
case TypeInfoType: return sizeof(TypeInfo);
+ case ModuleType: return 0;
}
errx(1, "This should not be reachable");
}
@@ -445,6 +449,7 @@ size_t type_align(type_t *t)
return align;
}
case TypeInfoType: return __alignof__(TypeInfo);
+ case ModuleType: return 0;
}
errx(1, "This should not be reachable");
}