Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(17)

Side by Side Diff: src/cmd/cgo/out.go

Issue 4661051: code review 4661051: strings.Split: make the default to split all. (Closed)
Patch Set: diff -r eaa696629d4d https://go.googlecode.com/hg/ Created 12 years, 9 months ago
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/cmd/cgo/gcc.go ('k') | src/cmd/godoc/dirtrees.go » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2009 The Go Authors. All rights reserved. 1 // Copyright 2009 The Go Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style 2 // Use of this source code is governed by a BSD-style
3 // license that can be found in the LICENSE file. 3 // license that can be found in the LICENSE file.
4 4
5 package main 5 package main
6 6
7 import ( 7 import (
8 "bytes" 8 "bytes"
9 "debug/elf" 9 "debug/elf"
10 "debug/macho" 10 "debug/macho"
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
141 } 141 }
142 return 142 return
143 } 143 }
144 144
145 if f, err := pe.Open(obj); err == nil { 145 if f, err := pe.Open(obj); err == nil {
146 sym, err := f.ImportedSymbols() 146 sym, err := f.ImportedSymbols()
147 if err != nil { 147 if err != nil {
148 fatalf("cannot load imported symbols from PE file %s: %v ", obj, err) 148 fatalf("cannot load imported symbols from PE file %s: %v ", obj, err)
149 } 149 }
150 for _, s := range sym { 150 for _, s := range sym {
151 » » » ss := strings.Split(s, ":", -1) 151 » » » ss := strings.Split(s, ":")
152 fmt.Printf("#pragma dynimport %s %s %q\n", ss[0], ss[0], strings.ToLower(ss[1])) 152 fmt.Printf("#pragma dynimport %s %s %q\n", ss[0], ss[0], strings.ToLower(ss[1]))
153 } 153 }
154 return 154 return
155 } 155 }
156 156
157 fatalf("cannot parse %s as ELF, Mach-O or PE", obj) 157 fatalf("cannot parse %s as ELF, Mach-O or PE", obj)
158 } 158 }
159 159
160 // Construct a gcc struct matching the 6c argument frame. 160 // Construct a gcc struct matching the 6c argument frame.
161 // Assumes that in gcc, char is 1 byte, short 2 bytes, int 4 bytes, long long 8 bytes. 161 // Assumes that in gcc, char is 1 byte, short 2 bytes, int 4 bytes, long long 8 bytes.
(...skipping 559 matching lines...) Expand 10 before | Expand all | Expand 10 after
721 typedef unsigned short ushort; 721 typedef unsigned short ushort;
722 typedef long long int64; 722 typedef long long int64;
723 typedef unsigned long long uint64; 723 typedef unsigned long long uint64;
724 typedef __SIZE_TYPE__ uintptr; 724 typedef __SIZE_TYPE__ uintptr;
725 725
726 typedef struct { char *p; int n; } GoString; 726 typedef struct { char *p; int n; } GoString;
727 typedef void *GoMap; 727 typedef void *GoMap;
728 typedef void *GoChan; 728 typedef void *GoChan;
729 typedef struct { void *t; void *v; } GoInterface; 729 typedef struct { void *t; void *v; } GoInterface;
730 ` 730 `
OLDNEW
« no previous file with comments | « src/cmd/cgo/gcc.go ('k') | src/cmd/godoc/dirtrees.go » ('j') | no next file with comments »

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b