aboutsummaryrefslogtreecommitdiff
path: root/types.c
diff options
context:
space:
mode:
authorBruce Hill <bruce@bruce-hill.com>2024-02-20 13:06:03 -0500
committerBruce Hill <bruce@bruce-hill.com>2024-02-20 13:06:03 -0500
commitf9cc44f145dd0c165010765791054666f973eff3 (patch)
tree5a5664797f9bee63a1c3287b3d05d4c20880df97 /types.c
parentd2aeee16e6ad84bfb2d77221e424d1441a2ceea2 (diff)
Fixing up enums
Diffstat (limited to 'types.c')
-rw-r--r--types.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/types.c b/types.c
index 6a6f15ca..34ef4a33 100644
--- a/types.c
+++ b/types.c
@@ -486,7 +486,7 @@ type_t *get_field_type(type_t *t, const char *field_name)
auto e = Match(t, EnumType);
for (tag_t *tag = e->tags; tag; tag = tag->next) {
if (streq(field_name, tag->name))
- return tag->type;
+ return Type(PointerType, .pointed=tag->type, .is_optional=true, .is_readonly=true);
}
return NULL;
}