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

Unified Diff: mojom/generators/c/cgen/type_translation.go

Issue 2072903002: C bindings pt3: Type table definitions and barebones files to get generated code to compile. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: elem_table -> elem_descriptor Created 4 years, 6 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/cgen/type_table.go ('k') | mojom/generators/c/templates/header.tmpl.go » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojom/generators/c/cgen/type_translation.go
diff --git a/mojom/generators/c/cgen/type_translation.go b/mojom/generators/c/cgen/type_translation.go
index ce0d6e221456d28ae6133b057ce1389f637d78bf..67f48cdfba61cc5f3ac16d8eefb643d66fb5e8d0 100644
--- a/mojom/generators/c/cgen/type_translation.go
+++ b/mojom/generators/c/cgen/type_translation.go
@@ -18,7 +18,6 @@ import (
// TODO(vardhan): Make this file unittestable? This involves making it not crash
// on failure (so that we can test failure).
-
// Translates: path/to/file.mojom -> PATH_TO_FILE_MOJOM_C_H_
func toHeaderGuard(path string) string {
return strings.Replace(strings.Replace(strings.ToUpper(path), string(os.PathSeparator), "_", -1), ".", "_", -1) + "_C_H_"
@@ -135,11 +134,11 @@ func mojomToCType(t mojom_types.Type, fileGraph *mojom_files.MojomFileGraph) str
case *mojom_types.TypeSimpleType:
return simpleTypeToCType(t.Interface().(mojom_types.SimpleType))
case *mojom_types.TypeArrayType:
- return "union MojomArrayPtr"
+ return "union MojomArrayHeaderPtr"
case *mojom_types.TypeMapType:
- return "union MojomMapPtr"
+ return "union MojomMapHeaderPtr"
case *mojom_types.TypeStringType:
- return "union MojomStringPtr"
+ return "union MojomStringHeaderPtr"
case *mojom_types.TypeHandleType:
return "MojoHandle"
case *mojom_types.TypeTypeReference:
« no previous file with comments | « mojom/generators/c/cgen/type_table.go ('k') | mojom/generators/c/templates/header.tmpl.go » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698