reflection support for tag strings

R=rsc
DELTA=86  (77 added, 0 deleted, 9 changed)
OCL=18201
CL=18203
This commit is contained in:
Rob Pike 2008-10-30 17:29:53 -07:00
parent 57804f1d2d
commit 12a3435869
4 changed files with 86 additions and 9 deletions

View file

@ -609,7 +609,7 @@ func StructCreator(typ Type, addr Addr) Value {
nfield := t.Len();
v := &StructValueStruct{ CommonV{StructKind, typ, addr}, new([]Value, nfield) };
for i := 0; i < nfield; i++ {
name, ftype, offset := t.Field(i);
name, ftype, str, offset := t.Field(i);
v.field[i] = NewValueAddr(ftype, addr + offset);
}
v.typ = typ;