github.com/hxx258456/ccgo@v0.0.5-0.20230213014102-48b35f46f66f/internal/bytealg/compare_native.go (about) 1 // Copyright 2018 The Go Authors. All rights reserved. 2 // Use of this source code is governed by a BSD-style 3 // license that can be found in the LICENSE file. 4 5 //go:build 386 || amd64 || s390x || arm || arm64 || ppc64 || ppc64le || mips || mipsle || wasm || mips64 || mips64le 6 // +build 386 amd64 s390x arm arm64 ppc64 ppc64le mips mipsle wasm mips64 mips64le 7 8 package bytealg 9 10 import _ "unsafe" // For go:linkname 11 12 //go:noescape 13 func Compare(a, b []byte) int 14 15 // The declaration below generates ABI wrappers for functions 16 // implemented in assembly in this package but declared in another 17 // package. 18 19 //go:linkname abigen_runtime_cmpstring runtime.cmpstring 20 func abigen_runtime_cmpstring(a, b string) int