mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
cgo working on linux/386
R=r DELTA=70 (47 added, 4 deleted, 19 changed) OCL=35167 CL=35171
This commit is contained in:
parent
0632bb4ae5
commit
e67a5084b8
10 changed files with 66 additions and 23 deletions
|
|
@ -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++;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue