summaryrefslogtreecommitdiff
path: root/src/cmd/6c/swt.c
diff options
context:
space:
mode:
authorRuss Cox <rsc@golang.org>2009-08-24 17:27:55 -0700
committerRuss Cox <rsc@golang.org>2009-08-24 17:27:55 -0700
commit83b749573cef6ceeac24202b3bc14d2860828490 (patch)
treee48d59ac3be610a5fa266574d25c82db4f958f19 /src/cmd/6c/swt.c
parent86908a0f4c77108949df3f096c1523f307b16542 (diff)
downloadgolang-83b749573cef6ceeac24202b3bc14d2860828490.tar.gz
ffi -> dynld.
move out of export data into its own section R=r DELTA=222 (71 added, 99 deleted, 52 changed) OCL=33801 CL=33808
Diffstat (limited to 'src/cmd/6c/swt.c')
-rw-r--r--src/cmd/6c/swt.c18
1 files changed, 8 insertions, 10 deletions
diff --git a/src/cmd/6c/swt.c b/src/cmd/6c/swt.c
index 9b2381ae9..15c2a5c2c 100644
--- a/src/cmd/6c/swt.c
+++ b/src/cmd/6c/swt.c
@@ -232,18 +232,16 @@ outcode(void)
Binit(&b, f, OWRITE);
Bprint(&b, "%s\n", thestring);
- if(nffi > 0) {
+ if(ndynld > 0) {
int i;
- if(package == nil) {
- yyerror("#pragma ffi without #pragma package");
- package = "_ffi_";
- }
- Bprint(&b, "\n$$ // ffi\n", thestring);
- Bprint(&b, "package %s\n", package);
- for(i=0; i<nffi; i++)
- Bprint(&b, "//ffi %c %s %s %s\n", ffi[i].type, ffi[i].local, ffi[i].remote, ffi[i].path);
- Bprint(&b, "$$\n\n$$\n\n");
+ Bprint(&b, "\n");
+ Bprint(&b, "$$ // exports\n\n");
+ Bprint(&b, "$$ // local types\n\n");
+ Bprint(&b, "$$ // dynld\n", thestring);
+ for(i=0; i<ndynld; i++)
+ Bprint(&b, "dynld %s %s %s\n", dynld[i].local, dynld[i].remote, dynld[i].path);
+ Bprint(&b, "$$\n\n");
}
Bprint(&b, "!\n");