Commit de5616fb authored by Russ Cox's avatar Russ Cox

gc: print of unsafe.Pointer

Got lost when I introduced TUNSAFEPTR.

R=ken2
CC=golang-dev
https://golang.org/cl/4442046
parent 4c137b61
...@@ -1785,7 +1785,7 @@ walkprint(Node *nn, NodeList **init, int defer) ...@@ -1785,7 +1785,7 @@ walkprint(Node *nn, NodeList **init, int defer)
on = syslook("printiface", 1); on = syslook("printiface", 1);
argtype(on, n->type); // any-1 argtype(on, n->type); // any-1
} }
} else if(isptr[et] || et == TCHAN || et == TMAP || et == TFUNC) { } else if(isptr[et] || et == TCHAN || et == TMAP || et == TFUNC || et == TUNSAFEPTR) {
if(defer) { if(defer) {
fmtprint(&fmt, "%%p"); fmtprint(&fmt, "%%p");
} else { } else {
......
// $G $D/$F.go && $L $F.$A && ./$A.out
// Copyright 2011 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package main
import "unsafe"
func main() {
var p unsafe.Pointer
println(p)
}
...@@ -157,6 +157,9 @@ panic: interface conversion: interface is int, not int32 ...@@ -157,6 +157,9 @@ panic: interface conversion: interface is int, not int32
panic: interface conversion: interface is main.T, not main.T panic: interface conversion: interface is main.T, not main.T
=========== fixedbugs/bug328.go
0x0
== bugs/ == bugs/
=========== bugs/bug322.go =========== bugs/bug322.go
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment