Francisco Souza | 60b98d6 | 2012-03-13 09:07:37 +1100 | [diff] [blame] | 1 | // Copyright 2012 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. |
Josh Bleecher Snyder | 5451fff | 2015-04-02 08:53:27 -0700 | [diff] [blame] | 4 | |
Francisco Souza | 60b98d6 | 2012-03-13 09:07:37 +1100 | [diff] [blame] | 5 | package print |
| 6 | |
| 7 | // #include <stdio.h> |
| 8 | // #include <stdlib.h> |
| 9 | import "C" |
| 10 | import "unsafe" |
| 11 | |
| 12 | func Print(s string) { |
| 13 | cs := C.CString(s) |
| 14 | defer C.free(unsafe.Pointer(cs)) |
| 15 | C.fputs(cs, (*C.FILE)(C.stdout)) |
| 16 | } |
| 17 | |
| 18 | // END OMIT |