make syscall use strings for file names

tweak os to adjust
move StringToBytes into syscall, at least for now

this program still works:

	package main

	import os "os"

	func main() {
		os.Stdout.WriteString("hello, world\n");
		a, b := os.NewFD(77).WriteString("no way");
		os.Stdout.WriteString(b.String() + "\n");
	}

R=rsc
DELTA=263  (59 added, 176 deleted, 28 changed)
OCL=15153
CL=15153
This commit is contained in:
Rob Pike 2008-09-11 13:40:17 -07:00
parent c80b06a54e
commit ccede3e872
9 changed files with 87 additions and 212 deletions

View file

@ -6,8 +6,8 @@ package os
import syscall "syscall"
// Errors are singleton structures. Use the Print()/String() methods to get their contents --
// they handle the nil (no error) case.
// Errors are singleton structures. Use the String() method to get their contents --
// it handles the nil (no error) case.
export type Error struct {
s string
}