Advertisement
Guest User

Untitled

a guest
May 4th, 2015
236
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.22 KB | None | 0 0
  1. package main
  2.  
  3. /*
  4. #import <stdio.h>
  5. #import <stdlib.h>
  6.  
  7. static void
  8. p(const char *c)
  9. {
  10. printf("%s\n", c);
  11. }
  12. */
  13. import "C"
  14. import "unsafe"
  15.  
  16. func main() {
  17. c := C.CString("Hello world")
  18. defer C.free(unsafe.Pointer(c))
  19.  
  20. C.p(c)
  21. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement