diff options
Diffstat (limited to 'src/cmd/cgo/stdio.go')
-rw-r--r-- | src/cmd/cgo/stdio.go | 27 |
1 files changed, 0 insertions, 27 deletions
diff --git a/src/cmd/cgo/stdio.go b/src/cmd/cgo/stdio.go deleted file mode 100644 index 4f09de799..000000000 --- a/src/cmd/cgo/stdio.go +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright 2009 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package main - -// #include <stdio.h> -// #include <stdlib.h> -import "C" - -type File C.FILE; - -func (f *File) Putc(c int) { - C.putc(C.int(c), (*C.FILE)(f)); -} - -func (f *File) Puts(s string) { - p := C.CString(s); - C.fputs(p, (*C.FILE)(f)); - C.free(unsafe.Pointer(p)); -} - -var Stdout = (*File)(C.stdout); - -func main() { - Stdout.Puts("hello, world\n"); -} |