mirror of https://github.com/golang/go.git
include local types in typestrings
R=r DELTA=16 (14 added, 1 deleted, 1 changed) OCL=17584 CL=17584
This commit is contained in:
parent
44b0ecc5ca
commit
2c3ddf5ef6
|
|
@ -90,16 +90,17 @@ ldpkg(Biobuf *f, int64 len, char *filename)
|
|||
fprint(2, "6l: short pkg read %s\n", filename);
|
||||
return;
|
||||
}
|
||||
|
||||
// first $$ marks beginning of exports
|
||||
p0 = strstr(data, "$$");
|
||||
if(p0 == nil)
|
||||
return;
|
||||
p0 += 2;
|
||||
while(*p0 != '\n' && *p0 != '\0')
|
||||
p0++;
|
||||
|
||||
p1 = strstr(p0, "$$");
|
||||
if(p1 == nil) {
|
||||
fprint(2, "6l: cannot find end of imports in %s\n", filename);
|
||||
fprint(2, "6l: cannot find end of exports in %s\n", filename);
|
||||
return;
|
||||
}
|
||||
while(*p0 == ' ' || *p0 == '\t' || *p0 == '\n')
|
||||
|
|
@ -115,6 +116,18 @@ ldpkg(Biobuf *f, int64 len, char *filename)
|
|||
p0++;
|
||||
|
||||
loadpkgdata(filename, p0, p1 - p0);
|
||||
|
||||
// local types begin where exports end.
|
||||
p0 = p1;
|
||||
while(*p0 != '\n' && *p0 != '\0')
|
||||
p0++;
|
||||
p1 = strstr(p0, "$$");
|
||||
if(p1 == nil) {
|
||||
fprint(2, "6l: cannot find end of local types in %s\n", filename);
|
||||
return;
|
||||
}
|
||||
|
||||
loadpkgdata(filename, p0, p1 - p0);
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
|
|||
Loading…
Reference in New Issue