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

Unified Diff: doc/progs/cgo2.go

Issue 9953043: code review 9953043: doc/articles: use C90 standard functions in the cgo article. (Closed)
Patch Set: diff -r bc2993c5834f https://code.google.com/p/go/ Created 11 years, 10 months ago
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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « doc/progs/cgo1.go ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: doc/progs/cgo2.go
===================================================================
--- a/doc/progs/cgo2.go
+++ b/doc/progs/cgo2.go
@@ -11,13 +11,13 @@
import "C"
func Random() int {
- var r C.long = C.random()
+ var r C.int = C.rand()
return int(r)
}
// STOP OMIT
func Seed(i int) {
- C.srandom(C.uint(i))
+ C.srand(C.uint(i))
}
// END OMIT
« no previous file with comments | « doc/progs/cgo1.go ('k') | no next file » | no next file with comments »

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