Commit 948bb915 authored by Russ Cox's avatar Russ Cox

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
parent fee7c69c
......@@ -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:
......
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