convert *[] to [].

R=r
OCL=21563
CL=21571
This commit is contained in:
Russ Cox 2008-12-18 22:37:22 -08:00
parent 9786f69f74
commit d47d888ba6
74 changed files with 532 additions and 543 deletions

View file

@ -26,11 +26,13 @@ type FmtTest struct {
out string;
}
func Bytes(s string) *[]byte {
b := new([]byte, len(s)+1);
syscall.StringToBytes(b, s);
return b[0:len(s)];
}
// TODO(rsc): return []byte, but need to be able to pass as interface.
// func Bytes(s string) []byte {
// b := new([]byte, len(s)+1);
// syscall.StringToBytes(b, s);
// return b[0:len(s)];
// }
func Bytes(s string) string { return s }
const B32 uint32 = 1<<32 - 1
const B64 uint64 = 1<<64 - 1