From 209cf4bf1c4a54a0e456bb716a4d7412331e98c1 Mon Sep 17 00:00:00 2001 From: Myk Taylor Date: Mon, 27 May 2024 16:58:14 -0700 Subject: [PATCH 1/4] add back union structure --- df.advmode.xml | 63 +++++++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 60 insertions(+), 3 deletions(-) diff --git a/df.advmode.xml b/df.advmode.xml index 299d2f858..7c7bf37c7 100644 --- a/df.advmode.xml +++ b/df.advmode.xml @@ -429,11 +429,68 @@ + + + + + + + + + + + + + + + - - - From cf0b5c504c5be1d2a094a9ec866246961962154e Mon Sep 17 00:00:00 2001 From: Myk Taylor Date: Mon, 27 May 2024 17:18:23 -0700 Subject: [PATCH 2/4] name the unions --- df.advmode.xml | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/df.advmode.xml b/df.advmode.xml index 7c7bf37c7..169c76689 100644 --- a/df.advmode.xml +++ b/df.advmode.xml @@ -427,12 +427,11 @@ - + - - + - - + - - + - From 3d3a2fa4baa546c4b38b6d379cbb80e8172c2da8 Mon Sep 17 00:00:00 2001 From: Myk Taylor Date: Mon, 27 May 2024 17:38:21 -0700 Subject: [PATCH 3/4] restore union fields --- df.advmode.xml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/df.advmode.xml b/df.advmode.xml index 169c76689..c48ece1ae 100644 --- a/df.advmode.xml +++ b/df.advmode.xml @@ -427,7 +427,7 @@ - + @@ -447,7 +447,7 @@ - + @@ -467,7 +467,7 @@ - + @@ -477,7 +477,7 @@ - + From 4c4c1d6837db1427c1f291337622d9dfe04778c4 Mon Sep 17 00:00:00 2001 From: Myk Taylor Date: Mon, 27 May 2024 17:38:27 -0700 Subject: [PATCH 4/4] don't publicly export structs and unions with no names --- StructFields.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/StructFields.pm b/StructFields.pm index 62bfa7f21..32b449a34 100644 --- a/StructFields.pm +++ b/StructFields.pm @@ -38,7 +38,7 @@ sub with_struct_block(&$;$%) { my $is_union = is_attr_true($tag,'is-union'); my $kwd = ($is_union ? "union" : "struct"); - my $exp = $export_prefix; #$flags{-export} ? $export_prefix : ''; + my $exp = $name ? $export_prefix : ''; header_ref("Export.h"); header_ref("DataDefs.h"); my $prefix = $kwd.' '.$exp.($name ? $name.' ' : '');