From b562bf141fa2184bf99b6a3d66375a48976e160a Mon Sep 17 00:00:00 2001 From: Richard Fuchs Date: Wed, 26 Jun 2024 12:34:58 -0400 Subject: [PATCH] MT#55283 add __ct to typed GList This is a placeholder to keep the const-qualified type of the contained type within the struct, so that it can be used via __typeof__ if necessary. Change-Id: Ib40c55daa2225b7f9a9a926a6fa74f9b1471b6de --- lib/containers.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/containers.h b/lib/containers.h index dec4880fa..b87afcc47 100644 --- a/lib/containers.h +++ b/lib/containers.h @@ -162,7 +162,10 @@ union type_name##_list { \ GList l; \ struct { \ - contained_type *data; \ + union { \ + contained_type *data; \ + const contained_type *__ct; \ + }; \ type_name##_list *next; \ type_name##_list *prev; \ }; \