diff options
| author | Russ Cox <rsc@golang.org> | 2010-06-21 19:53:08 -0700 |
|---|---|---|
| committer | Russ Cox <rsc@golang.org> | 2010-06-21 19:53:08 -0700 |
| commit | 44ca04d3d60250abe69c0f8fe000666fa4e91386 (patch) | |
| tree | f33bce4aabb56b181013ca1c3a7fd32f352d8b90 /src/pkg/bytes | |
| parent | f374575fb7f8b9cec4008e2e55e66e1d8500f931 (diff) | |
| download | go-44ca04d3d60250abe69c0f8fe000666fa4e91386.tar.xz | |
big, bytes: move assembly externs to separate file
to make it easier to build package without assembly.
R=r, r2
CC=golang-dev
https://golang.org/cl/1680045
Diffstat (limited to 'src/pkg/bytes')
| -rw-r--r-- | src/pkg/bytes/Makefile | 1 | ||||
| -rw-r--r-- | src/pkg/bytes/bytes.go | 3 | ||||
| -rw-r--r-- | src/pkg/bytes/bytes_decl.go | 8 |
3 files changed, 9 insertions, 3 deletions
diff --git a/src/pkg/bytes/Makefile b/src/pkg/bytes/Makefile index b2076c181c..d50e624d6e 100644 --- a/src/pkg/bytes/Makefile +++ b/src/pkg/bytes/Makefile @@ -8,6 +8,7 @@ TARG=bytes GOFILES=\ buffer.go\ bytes.go\ + bytes_decl.go\ OFILES=\ asm_$(GOARCH).$O\ diff --git a/src/pkg/bytes/bytes.go b/src/pkg/bytes/bytes.go index a8ecf3adf9..852e0f8529 100644 --- a/src/pkg/bytes/bytes.go +++ b/src/pkg/bytes/bytes.go @@ -103,9 +103,6 @@ func Index(s, sep []byte) int { return -1 } -// IndexByte returns the index of the first instance of c in s, or -1 if c is not present in s. -func IndexByte(s []byte, c byte) int // asm_$GOARCH.s - func indexBytePortable(s []byte, c byte) int { for i, b := range s { if b == c { diff --git a/src/pkg/bytes/bytes_decl.go b/src/pkg/bytes/bytes_decl.go new file mode 100644 index 0000000000..5d2b9e6393 --- /dev/null +++ b/src/pkg/bytes/bytes_decl.go @@ -0,0 +1,8 @@ +// Copyright 2010 The Go 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 bytes + +// IndexByte returns the index of the first instance of c in s, or -1 if c is not present in s. +func IndexByte(s []byte, c byte) int // asm_$GOARCH.s |
