diff --git a/misc/cgo/Makefile b/misc/cgo/Makefile deleted file mode 100644 index 9a0720f69..000000000 --- a/misc/cgo/Makefile +++ /dev/null @@ -1,13 +0,0 @@ -include $(GOROOT)/src/Make.inc - -TARG=camdev/ctest - -CGOFILES=\ - callback.go\ - -CGO_OFILES=\ - callback_c.o\ - -include $(GOROOT)/src/Make.pkg - - diff --git a/misc/cgo/callback.go b/misc/cgo/callback.go deleted file mode 100644 index 3d4a982a0..000000000 --- a/misc/cgo/callback.go +++ /dev/null @@ -1,22 +0,0 @@ -package ctest - -/* -#include - -#include "cstuff.h" -*/ -import "C" - -import "unsafe" - -//export GoFoo -func GoFoo(c *C.char) { - gstr := C.GoString(c) - println("I AM GO", gstr) -} - -func CallC(s string) { - cstr := C.CString(s) - defer C.free(unsafe.Pointer(cstr)) - C.CFoo(cstr) -} diff --git a/misc/cgo/callback_c.c b/misc/cgo/callback_c.c deleted file mode 100644 index dcaa1c8bb..000000000 --- a/misc/cgo/callback_c.c +++ /dev/null @@ -1,4 +0,0 @@ -int CFoo(const char* c) { - GoFoo(c); -} - diff --git a/misc/cgo/cstuff.h b/misc/cgo/cstuff.h deleted file mode 100644 index 3d9c3c010..000000000 --- a/misc/cgo/cstuff.h +++ /dev/null @@ -1 +0,0 @@ -extern void CFoo(const char* c); diff --git a/misc/cgo/use.go b/misc/cgo/use.go deleted file mode 100644 index bf4c18bc4..000000000 --- a/misc/cgo/use.go +++ /dev/null @@ -1,10 +0,0 @@ -package main - -import ( - "camdev/ctest" -) - -func main() { - ctest.CallC("foo") -} -