mirror of https://github.com/perkeep/perkeep.git
Remove old cgo tests
Change-Id: Iebdfadd483e858b9127342fc35f21ea7da69da80
This commit is contained in:
parent
0f5870c4d8
commit
c966fe8c12
|
@ -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
|
||||
|
||||
|
|
@ -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)
|
||||
}
|
|
@ -1,4 +0,0 @@
|
|||
int CFoo(const char* c) {
|
||||
GoFoo(c);
|
||||
}
|
||||
|
|
@ -1 +0,0 @@
|
|||
extern void CFoo(const char* c);
|
|
@ -1,10 +0,0 @@
|
|||
package main
|
||||
|
||||
import (
|
||||
"camdev/ctest"
|
||||
)
|
||||
|
||||
func main() {
|
||||
ctest.CallC("foo")
|
||||
}
|
||||
|
Loading…
Reference in New Issue