func newState(L *C.lua_State) *State { newstate := &State{L, 0, make([]interface{}, 0, 8), make([]uint, 0, 8)} registerGoState(newstate) C.clua_setgostate(L, C.size_t(newstate.Index)) C.clua_initstate(L) return newstate }
func newState(L *C.lua_State) *State { var newstatei interface{} newstate := &State{L, make([]interface{}, 0, 8), make([]uint, 0, 8)} newstatei = newstate ns1 := unsafe.Pointer(&newstatei) ns2 := (*C.GoInterface)(ns1) C.clua_setgostate(L, *ns2) //hacky.... C.clua_initstate(L) return newstate }