Beispiel #1
0
func (L *State) OptString(narg int, d string) string {
	var length C.size_t
	Cd := C.CString(d)
	ret := C.GoString(C.luaL_optlstring(L.s, C.int(narg), Cd, &length))
	C.free(unsafe.Pointer(Cd))
	return ret
}
Beispiel #2
0
func (L *State) OptString(narg int, d string) string {
	var length C.size_t
	return C.GoString(C.luaL_optlstring(L.s, C.int(narg), C.CString(d), &length))
}