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

Delta Between Two Patch Sets: src/pkg/go/build/cgotest/cgotest.go

Issue 5018044: code review 5018044: go/build: handle cgo, //build comments (Closed)
Left Patch Set: Created 12 years, 6 months ago
Right Patch Set: diff -r 2a7e3e5d18bd https://go.googlecode.com/hg Created 12 years, 6 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:
Right: Side by side diff | Download
« no previous file with change/comment | « src/pkg/go/build/build_test.go ('k') | src/pkg/go/build/dir.go » ('j') | no next file with change/comment »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
LEFTRIGHT
(no file at all)
1 // Copyright 2011 The Go Authors. All rights reserved. 1 // Copyright 2011 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 cgotest 5 package cgotest
6 6
7 /* 7 /*
8 char* greeting = "hello, world"; 8 char* greeting = "hello, world";
9 #cgo darwin/amd64 LDFLAGS: -lregexp
10 #cgo linux CFLAGS: -m32
11 #cgo pkg-config: cairo moscow
9 */ 12 */
10 // #include "cgotest.h" 13 // #include "cgotest.h"
11 import "C" 14 import "C"
12 import "unsafe" 15 import "unsafe"
13 16
14 var Greeting = C.GoString(C.greeting) 17 var Greeting = C.GoString(C.greeting)
15 18
16 func DoAdd(x, y int) (sum int) { 19 func DoAdd(x, y int) (sum int) {
17 C.Add(C.int(x), C.int(y), (*C.int)(unsafe.Pointer(&sum))) 20 C.Add(C.int(x), C.int(y), (*C.int)(unsafe.Pointer(&sum)))
18 return 21 return
19 } 22 }
LEFTRIGHT

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