예제 #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
}
예제 #2
0
파일: lauxlib.go 프로젝트: afitz/golua
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))
}