mirror of
https://github.com/golang/go
synced 2024-11-23 06:00:08 -07:00
cmd/cc: translate C Eface type as Go interface{}
This will allow structs containing Efaces in C to be manipulated as structs containing real interfaces in Go. The eface struct is still defined for use by Go code. LGTM=iant R=golang-codereviews, iant CC=dvyukov, golang-codereviews, khr, r https://golang.org/cl/133980044
This commit is contained in:
parent
fee7c69c6c
commit
948bb9150e
@ -218,11 +218,13 @@ printtypename(Type *t)
|
||||
n = s->name;
|
||||
else if(t->tag)
|
||||
n = t->tag->name;
|
||||
if(strcmp(n, "String") == 0){
|
||||
if(strcmp(n, "String") == 0)
|
||||
Bprint(&outbuf, "string");
|
||||
} else if(strcmp(n, "Slice") == 0){
|
||||
else if(strcmp(n, "Slice") == 0)
|
||||
Bprint(&outbuf, "[]byte");
|
||||
} else
|
||||
else if(strcmp(n, "Eface") == 0)
|
||||
Bprint(&outbuf, "interface{}");
|
||||
else
|
||||
Bprint(&outbuf, "%U", n);
|
||||
break;
|
||||
case TFUNC:
|
||||
|
Loading…
Reference in New Issue
Block a user