all: clean up code with Go 1.24+ in mind (#5489)

* all: clean up code with Go 1.24+ in mind

* all: more old go cleanup

* all: even remove rand_fastrand64

* runtime: revert rand changes

* runtime: re-drop rand_fastrand64
This commit is contained in:
Jake Bailey
2026-07-03 10:10:55 -07:00
committed by GitHub
parent bf80e9b446
commit e79edb58b2
19 changed files with 78 additions and 271 deletions
+1 -6
View File
@@ -160,12 +160,7 @@ func write(fd uintptr, p unsafe.Pointer, n int32) int32 {
if fd == 2 { // stderr
// Convert to a string, because we know that p won't change during the
// call to printstring.
// TODO: use unsafe.String instead once we require Go 1.20.
s := _string{
ptr: (*byte)(p),
length: uintptr(n),
}
str := *(*string)(unsafe.Pointer(&s))
str := unsafe.String((*byte)(p), int(n))
printstring(str)
return n
}