mirror of
https://github.com/go-gitea/gitea
synced 2025-07-09 03:57:19 +00:00
Update to last common bleve (#3986)
This commit is contained in:
committed by
Lunny Xiao
parent
1b7cd3d0b0
commit
917b9641ec
18
vendor/github.com/philhofer/fwd/writer_unsafe.go
generated
vendored
Normal file
18
vendor/github.com/philhofer/fwd/writer_unsafe.go
generated
vendored
Normal file
@ -0,0 +1,18 @@
|
||||
// +build !appengine
|
||||
|
||||
package fwd
|
||||
|
||||
import (
|
||||
"reflect"
|
||||
"unsafe"
|
||||
)
|
||||
|
||||
// unsafe cast string as []byte
|
||||
func unsafestr(b string) []byte {
|
||||
l := len(b)
|
||||
return *(*[]byte)(unsafe.Pointer(&reflect.SliceHeader{
|
||||
Len: l,
|
||||
Cap: l,
|
||||
Data: (*reflect.StringHeader)(unsafe.Pointer(&b)).Data,
|
||||
}))
|
||||
}
|
Reference in New Issue
Block a user