blob: d96582e12d5acbec04d519725324fb3603a0b31b [file] [log] [blame]
package cgo
/*
#include <stdio.h>
#include <stdlib.h>
void myprint(char* s) {
printf("%s\n", s);
}
*/
import "C"
import "fmt"
import "unsafe"
func Example() { //@mark(funccgoexample, "Example"),item(funccgoexample, "Example", "func()", "func")
fmt.Println()
cs := C.CString("Hello from stdio\n")
C.myprint(cs)
C.free(unsafe.Pointer(cs))
}
func _() {
Example()
}