mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
Revert "runtime: use bytes.IndexByte in findnull"
This reverts commit 7365fac2db.
Reason for revert: breaks the build on some architectures, reading unmapped pages?
Change-Id: I3a8c02dc0b649269faacea79ecd8213defa97c54
Reviewed-on: https://go-review.googlesource.com/97995
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
This commit is contained in:
parent
f1fc9da316
commit
1fadbc1a76
4 changed files with 7 additions and 20 deletions
|
|
@ -31,8 +31,6 @@ struct S {
|
|||
int x;
|
||||
};
|
||||
|
||||
const char *cstr = "abcefghijklmnopqrstuvwxyzABCEFGHIJKLMNOPQRSTUVWXYZ1234567890";
|
||||
|
||||
extern enum E myConstFunc(struct S* const ctx, int const id, struct S **const filter);
|
||||
|
||||
enum E myConstFunc(struct S *const ctx, int const id, struct S **const filter) { return 0; }
|
||||
|
|
@ -151,18 +149,6 @@ func benchCgoCall(b *testing.B) {
|
|||
}
|
||||
}
|
||||
|
||||
var sinkString string
|
||||
|
||||
func benchGoString(b *testing.B) {
|
||||
for i := 0; i < b.N; i++ {
|
||||
sinkString = C.GoString(C.cstr)
|
||||
}
|
||||
const want = "abcefghijklmnopqrstuvwxyzABCEFGHIJKLMNOPQRSTUVWXYZ1234567890"
|
||||
if sinkString != want {
|
||||
b.Fatalf("%q != %q", sinkString, want)
|
||||
}
|
||||
}
|
||||
|
||||
// Issue 2470.
|
||||
func testUnsignedInt(t *testing.T) {
|
||||
a := (int64)(C.UINT32VAL)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue