You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Do we want to start using unsafe.Add for arrays? It will make the code shorter and potentially easier to read. It would, however, require that we push the version of the compiler to 1.17 and all resulting code would use that version too.
Example:
var Ptr *int
Ptr = (*int)(unsafe.Pointer(uintptr(unsafe.Pointer(Ptr)) + uintptr(Len)))
Now becomes:
var Ptr *int
Ptr = (*int)(unsafe.Add(unsafe.Pointer(Ptr)), Len)
The text was updated successfully, but these errors were encountered:
Do we want to start using
unsafe.Add
for arrays? It will make the code shorter and potentially easier to read. It would, however, require that we push the version of the compiler to 1.17 and all resulting code would use that version too.Example:
Now becomes:
The text was updated successfully, but these errors were encountered: