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

Delta Between Two Patch Sets: misc/cgo/testshared/shared.go

Issue 9738047: code review 9738047: runtime: Add shared library support (linux/amd64)
Left Patch Set: diff -r a3545f2fb0a2 https://go.googlecode.com/hg/ Created 10 years, 9 months ago
Right Patch Set: diff -r 3833ddddde2b1a2741a396c4e965b04d525a133b https://go.googlecode.com/hg/ Created 10 years, 7 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:
Left: Side by side diff | Download
Right: Side by side diff | Download
« no previous file with change/comment | « misc/cgo/testshared/mainmult.c ('k') | misc/cgo/testshared/shared2.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
1 // Copyright 2013 The Go Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style
3 // license that can be found in the LICENSE file.
4
1 package main 5 package main
2 6
3 import "C" 7 import "C"
8
9 import (
10 "fmt"
11 "os"
12 "time"
13 )
4 14
5 var v int 15 var v int
6 16
7 //export Go_callback 17 //export Go_callback
8 func Go_callback() int { 18 func Go_callback() int {
19 // Sleep a little to allow to test concurrent runtime initialization fro m mainadv.c
20 time.Sleep(200 * time.Millisecond)
9 return v 21 return v
22 }
23
24 //export Go_testEnv
25 func Go_testEnv() {
26 env := os.Getenv("TEST_ENV")
27 if env != "test" {
28 panic(fmt.Errorf("Expected TEST_ENV=%s, but got %s", "test", env ))
29 }
10 } 30 }
11 31
12 func main() { 32 func main() {
13 v = 42 33 v = 42
14 } 34 }
LEFTRIGHT

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