Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package main
- /*
- #import <stdio.h>
- #import <stdlib.h>
- static void
- p(const char *c)
- {
- printf("%s\n", c);
- }
- */
- import "C"
- import "unsafe"
- func main() {
- c := C.CString("Hello world")
- defer C.free(unsafe.Pointer(c))
- C.p(c)
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement