Skip to content

Instantly share code, notes, and snippets.

@akkijp
Created May 8, 2016 11:49
Show Gist options
  • Save akkijp/15c00105ae188c76057b45836097ce7d to your computer and use it in GitHub Desktop.
Save akkijp/15c00105ae188c76057b45836097ce7d to your computer and use it in GitHub Desktop.
package main
/*
#include <stdio.h>
#include <stdlib.h>
void mStringPrintln(char* s) {
printf("%s\n", s);
}
*/
import "C"
import "unsafe"
func main(){
cs := C.CString("Hello from stdio")
C.mStringPrintln(cs)
C.free(unsafe.Pointer(cs))
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment