From 89f97e82876153d948608c5c3bbb5b92f78cfc19 Mon Sep 17 00:00:00 2001 From: Nicolas Williams Date: Mon, 8 Feb 2021 22:40:39 -0600 Subject: [PATCH] asn1: Improve XXX comment --- lib/asn1/gen_template.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/lib/asn1/gen_template.c b/lib/asn1/gen_template.c index a6b1e2e31..0859a887e 100644 --- a/lib/asn1/gen_template.c +++ b/lib/asn1/gen_template.c @@ -70,7 +70,13 @@ static const char * integer_symbol(const char *basename, const Type *t) { if (t->members) - return "int"; /* XXX enum foo */ + /* + * XXX enum foo -- compute the size either from inspecting the members + * and applying the ABI's rules for enum size, OR infer the field + * size from a template by using the offsetof field. The latter is + * hard to do though. + */ + return "int"; else if (t->range == NULL) return "heim_integer"; else if (t->range->min < INT_MIN && t->range->max <= INT64_MAX)