aboutsummaryrefslogtreecommitdiff
path: root/sys/cmd/cc/cc.c
diff options
context:
space:
mode:
authorNicholas Noll <nbnoll@eml.cc>2020-05-29 14:55:24 -0700
committerNicholas Noll <nbnoll@eml.cc>2020-05-29 14:55:24 -0700
commit3b2503978998ee1e8d4aeebbdbfb743f125e1b5e (patch)
tree593e0d16fdf4d8401973348ded54fe724589649e /sys/cmd/cc/cc.c
parent43ecfce7d20360a5fdc53e5ced266eccc8723242 (diff)
switch types to be integers into the main database
Diffstat (limited to 'sys/cmd/cc/cc.c')
-rw-r--r--sys/cmd/cc/cc.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/sys/cmd/cc/cc.c b/sys/cmd/cc/cc.c
index a25fd69..2dcf897 100644
--- a/sys/cmd/cc/cc.c
+++ b/sys/cmd/cc/cc.c
@@ -94,17 +94,15 @@ END:
// -----------------------------------------------------------------------
// type interning
-Type *
+int
type()
{
- Type *t;
-
if (C.type.len >= C.type.cap) {
C.type.cap += 100;
C.type.info = realloc(C.type.info, C.type.cap * sizeof(*C.type.info));
}
- return C.type.info + C.type.len++;
+ return C.type.len++;
}
// -----------------------------------------------------------------------