Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(50)

Unified Diff: mojom/generators/c/templates/type_table.tmpl.go

Issue 2163793002: C bindings: Implement _Validate(), and some pre-requisites (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: address comments Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « mojom/generators/c/templates/struct.tmpl.go ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojom/generators/c/templates/type_table.tmpl.go
diff --git a/mojom/generators/c/templates/type_table.tmpl.go b/mojom/generators/c/templates/type_table.tmpl.go
index 409a69c7fe6b1ec9242eb4cd1b376186a5430efc..7808bc010e18eeb153b4a3bcc634b503caaa704d 100644
--- a/mojom/generators/c/templates/type_table.tmpl.go
+++ b/mojom/generators/c/templates/type_table.tmpl.go
@@ -43,6 +43,7 @@ struct MojomTypeDescriptorUnion {{$union.Name}};
static struct MojomTypeDescriptorArray {{$array.Name}} = {
.elem_type = {{$array.ElemType}},
.elem_descriptor = {{$array.ElemTable}},
+ .elem_num_bits = {{$array.ElemNumBits}},
.num_elements = {{$array.NumElements}},
.nullable = {{$array.Nullable}},
};
@@ -62,7 +63,15 @@ struct MojomTypeDescriptorStructEntry {{$struct.Name}}_Entries[] = {
{{end -}}
};
+struct MojomTypeDescriptorStructVersion {{$struct.Name}}_Versions[] = {
+{{- range $version := $struct.Versions}}
+ { .version = {{$version.Version}}, .num_bytes = {{$version.NumBytes}} },
+{{end -}}
+};
+
struct MojomTypeDescriptorStruct {{$struct.Name}} = {
+ .num_versions = {{len $struct.Versions}}ul,
+ .versions = {{$struct.Name}}_Versions,
.num_entries = {{len $struct.Entries}}ul,
.entries = {{$struct.Name}}_Entries,
};
« no previous file with comments | « mojom/generators/c/templates/struct.tmpl.go ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698