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

Unified Diff: third_party/mojo/src/mojo/public/go/bindings/util.go

Issue 904103003: Update mojo sdk to rev 8d45c89c30b230843c5bd6dd0693a555750946c0 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: surfaces_service.mojom.h -> surfaces.mojom.h Created 5 years, 10 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
Index: third_party/mojo/src/mojo/public/go/bindings/util.go
diff --git a/third_party/mojo/src/mojo/public/go/bindings/util.go b/third_party/mojo/src/mojo/public/go/bindings/util.go
new file mode 100644
index 0000000000000000000000000000000000000000..8d51ddb721cabec0606d38096ba7b2893ef3c28c
--- /dev/null
+++ b/third_party/mojo/src/mojo/public/go/bindings/util.go
@@ -0,0 +1,20 @@
+// Copyright 2015 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+package bindings
+
+func align(size, alignment int) int {
+ return ((size - 1) | (alignment - 1)) + 1
+}
+
+// bytesForBits returns minimum number of bytes required to store provided
+// number of bits.
+func bytesForBits(bits uint64) int {
+ return int((bits + 7) / 8)
+}
+
+// StringPointer converts provided string to *string.
+func StringPointer(s string) *string {
+ return &s
+}

Powered by Google App Engine
This is Rietveld 408576698