diff options
author | Russ Cox <rsc@golang.org> | 2009-09-30 13:47:15 -0700 |
---|---|---|
committer | Russ Cox <rsc@golang.org> | 2009-09-30 13:47:15 -0700 |
commit | 872a8a09080aee0bb54eddf8cbc3d57a61aec6ab (patch) | |
tree | 8e798c970bfa78770ae32e343c2b5807dcbbb2da /src/cmd/cgo/out.go | |
parent | cea1e9d746c5013b6566fac3a06f817626fbcae1 (diff) | |
download | golang-872a8a09080aee0bb54eddf8cbc3d57a61aec6ab.tar.gz |
cgo working on linux/386
R=r
DELTA=70 (47 added, 4 deleted, 19 changed)
OCL=35167
CL=35171
Diffstat (limited to 'src/cmd/cgo/out.go')
-rw-r--r-- | src/cmd/cgo/out.go | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/cmd/cgo/out.go b/src/cmd/cgo/out.go index 36fbe0349..91473abeb 100644 --- a/src/cmd/cgo/out.go +++ b/src/cmd/cgo/out.go @@ -100,8 +100,8 @@ func (p *Prog) writeOutput(srcfile string) { structType += fmt.Sprintf("\t\t%s p%d;\n", t.C, i); off += t.Size; } - if off%ptrSize != 0 { - pad := ptrSize - off%ptrSize; + if off%p.PtrSize != 0 { + pad := p.PtrSize - off%p.PtrSize; structType += fmt.Sprintf("\t\tchar __pad%d[%d];\n", npad, pad); off += pad; npad++; @@ -116,8 +116,8 @@ func (p *Prog) writeOutput(srcfile string) { structType += fmt.Sprintf("\t\t%s r;\n", t.C); off += t.Size; } - if off%ptrSize != 0 { - pad := ptrSize - off%ptrSize; + if off%p.PtrSize != 0 { + pad := p.PtrSize - off%p.PtrSize; structType += fmt.Sprintf("\t\tchar __pad%d[%d];\n", npad, pad); off += pad; npad++; |