Remove old cgo tests

Change-Id: Iebdfadd483e858b9127342fc35f21ea7da69da80
This commit is contained in:
Brad Fitzpatrick 2012-12-16 20:43:48 -08:00
parent 0f5870c4d8
commit c966fe8c12
5 changed files with 0 additions and 50 deletions

View File

@ -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

View File

@ -1,22 +0,0 @@
package ctest
/*
#include <stdlib.h>
#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)
}

View File

@ -1,4 +0,0 @@
int CFoo(const char* c) {
GoFoo(c);
}

View File

@ -1 +0,0 @@
extern void CFoo(const char* c);

View File

@ -1,10 +0,0 @@
package main
import (
"camdev/ctest"
)
func main() {
ctest.CallC("foo")
}