mirror of
https://github.com/golang/go.git
synced 2024-09-29 06:17:11 +00:00
print(map) and print(chan) as pointers.
R=ken OCL=23520 CL=23520
This commit is contained in:
parent
646b3b5c02
commit
3c5f3a8641
@ -16,7 +16,7 @@ func printbool(bool);
|
||||
func printfloat(float64);
|
||||
func printint(int64);
|
||||
func printstring(string);
|
||||
func printpointer(*any);
|
||||
func printpointer(any);
|
||||
func printinter(any);
|
||||
func printarray(any);
|
||||
func printnl();
|
||||
|
@ -8,7 +8,7 @@ char *sysimport =
|
||||
"func sys.printfloat (? float64)\n"
|
||||
"func sys.printint (? int64)\n"
|
||||
"func sys.printstring (? string)\n"
|
||||
"func sys.printpointer (? *any)\n"
|
||||
"func sys.printpointer (? any)\n"
|
||||
"func sys.printinter (? any)\n"
|
||||
"func sys.printarray (? any)\n"
|
||||
"func sys.printnl ()\n"
|
||||
|
@ -1983,9 +1983,9 @@ loop:
|
||||
argtype(on, l->type); // any-1
|
||||
break;
|
||||
}
|
||||
if(isptr[l->type->etype]) {
|
||||
if(isptr[l->type->etype] || l->type->etype == TCHAN || l->type->etype == TMAP) {
|
||||
on = syslook("printpointer", 1);
|
||||
argtype(on, l->type->type); // any-1
|
||||
argtype(on, l->type); // any-1
|
||||
break;
|
||||
}
|
||||
if(isslice(l->type)) {
|
||||
@ -1993,7 +1993,7 @@ loop:
|
||||
argtype(on, l->type); // any-1
|
||||
break;
|
||||
}
|
||||
badtype(n->op, l->type, T);
|
||||
badtype(OPRINT, l->type, T);
|
||||
l = listnext(&save);
|
||||
goto loop;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user