zworld/engine/renderapi/device/memcpy.go
2024-01-14 22:56:06 +08:00

9 lines
163 B
Go

package device
import "unsafe"
func Memcpy(dst, src unsafe.Pointer, n int) int {
copy(unsafe.Slice((*byte)(dst), n), unsafe.Slice((*byte)(src), n))
return n
}