2
0
mirror of https://gitlab.com/ita1024/waf.git synced 2024-12-02 06:50:26 +01:00
waf/demos/go/my-c-lib-2.go

17 lines
226 B
Go
Raw Normal View History

2011-09-10 11:13:51 +02:00
package foo
/*
#cgo LDFLAGS: -lmy-c-lib
#include "my-c-lib.h"
#include <stdlib.h>
*/
import "C"
import "unsafe"
func MyBye(msg string) {
c_msg := C.CString(msg)
defer C.free(unsafe.Pointer(c_msg))
C.my_c_bye(c_msg)
}