dawn.h: Don't use anonymous structures
Instead make them have the same name as their typedef. This is because
anonymous structures is considered bad practice in C because it prevents
forward declaring them.
BUG=
Change-Id: I2d7a788a0d807a2689567d0bb220adaf5335e07a
Reviewed-on: https://dawn-review.googlesource.com/1521
Reviewed-by: Stephen White <senorblanco@chromium.org>
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
diff --git a/generator/templates/api.h b/generator/templates/api.h
index 9d93fc6..0b8a19a 100644
--- a/generator/templates/api.h
+++ b/generator/templates/api.h
@@ -36,7 +36,7 @@
{% endfor %}
{% for type in by_category["structure"] %}
- typedef struct {
+ typedef struct {{as_cType(type.name)}} {
{% if type.extensible %}
const void* nextInChain;
{% endif %}
@@ -44,6 +44,7 @@
{{as_annotated_cType(member)}};
{% endfor %}
} {{as_cType(type.name)}};
+
{% endfor %}
// Custom types depending on the target language