Closed kumakichi closed 6 years ago
simple to test,
revel new -a my-app -r
edit my-app/app/controllers/app.go with code:
package controllers // typedef int (*intFunc) (); // // int // bridge_int_func(intFunc f) // { // return f(); // } // // int fortytwo() // { // return 42; // } import "C" import ( "github.com/revel/revel" ) type App struct { *revel.Controller } func (c App) Index() revel.Result { f := C.intFunc(C.fortytwo) revel.AppLog.Debugf("cgo test : %d\n", int(C.bridge_int_func(f))) return c.Render() }
I'll catch your changes, I just need to get develop branch caught up with master first thanks
i just wanna close this pr,and re-pull one based on develop branch
simple to test,
revel new -a my-app -r
edit my-app/app/controllers/app.go with code: