summaryrefslogtreecommitdiff
path: root/src/lib/net/fd_darwin.go
diff options
context:
space:
mode:
authorRuss Cox <rsc@golang.org>2009-04-15 20:27:45 -0700
committerRuss Cox <rsc@golang.org>2009-04-15 20:27:45 -0700
commit0ada410ece61f805c66b63eb15bb8584c3e584cd (patch)
tree16cfcc3cc7d82aa01da1b152e520297da5afc88a /src/lib/net/fd_darwin.go
parent398d9c9582bcde24740e65cc4e5c9b97c5bcac40 (diff)
downloadgolang-0ada410ece61f805c66b63eb15bb8584c3e584cd.tar.gz
code changes for array conversion.
as a reminder, the old conversion was that you could write var arr [10]byte; var slice []byte; slice = arr; but now you have to write slice = &arr; the change eliminates an implicit &, so that the only implicit &s left are in the . operator and in string(arr). also, removed utf8.EncodeRuneToString in favor of string(rune). R=r DELTA=83 (1 added, 23 deleted, 59 changed) OCL=27531 CL=27534
Diffstat (limited to 'src/lib/net/fd_darwin.go')
-rw-r--r--src/lib/net/fd_darwin.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/lib/net/fd_darwin.go b/src/lib/net/fd_darwin.go
index 74f0f4867..c543755b9 100644
--- a/src/lib/net/fd_darwin.go
+++ b/src/lib/net/fd_darwin.go
@@ -49,7 +49,7 @@ func (p *pollster) AddFD(fd int64, mode int, repeat bool) *os.Error {
ev.Flags |= syscall.EV_ONESHOT
}
- n, e := syscall.Kevent(p.kq, events, events, nil);
+ n, e := syscall.Kevent(p.kq, &events, &events, nil);
if e != 0 {
return os.ErrnoToError(e)
}
@@ -78,7 +78,7 @@ func (p *pollster) DelFD(fd int64, mode int) {
// EV_RECEIPT - generate fake EV_ERROR as result of add,
// rather than waiting for real event
ev.Flags = syscall.EV_DELETE | syscall.EV_RECEIPT;
- syscall.Kevent(p.kq, events, events, nil);
+ syscall.Kevent(p.kq, &events, &events, nil);
}
func (p *pollster) WaitFD(nsec int64) (fd int64, mode int, err *os.Error) {
@@ -91,7 +91,7 @@ func (p *pollster) WaitFD(nsec int64) (fd int64, mode int, err *os.Error) {
t.Sec = nsec / 1e9;
t.Nsec = uint64(nsec % 1e9);
}
- nn, e := syscall.Kevent(p.kq, nil, p.eventbuf, t);
+ nn, e := syscall.Kevent(p.kq, nil, &p.eventbuf, t);
if e != 0 {
if e == syscall.EINTR {
continue