zworld/engine/renderapi/device/memcpy.go

9 lines
163 B
Go
Raw Permalink Normal View History

2024-01-14 22:56:06 +08:00
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
}