| 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
|
| +}
|
|
|