aboutsummaryrefslogtreecommitdiff
path: root/src/runtime/chan.go
diff options
context:
space:
mode:
Diffstat (limited to 'src/runtime/chan.go')
-rw-r--r--src/runtime/chan.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/runtime/chan.go b/src/runtime/chan.go
index db8ed8c863..0a8578d435 100644
--- a/src/runtime/chan.go
+++ b/src/runtime/chan.go
@@ -70,7 +70,7 @@ func makechan64(t *chantype, size int64) *hchan {
}
func makechan(t *chantype, size int) *hchan {
- elem := t.elem
+ elem := t.Elem
// compiler checks this but be safe.
if elem.Size_ >= 1<<16 {
@@ -104,11 +104,11 @@ func makechan(t *chantype, size int) *hchan {
default:
// Elements contain pointers.
c = new(hchan)
- c.buf = mallocgc(mem, elem, true)
+ c.buf = mallocgc(mem, toType(elem), true)
}
c.elemsize = uint16(elem.Size_)
- c.elemtype = elem
+ c.elemtype = toType(elem)
c.dataqsiz = uint(size)
lockInit(&c.lock, lockRankHchan)