示例#1
0
文件: lauxlib.go 项目: 1lann/golua
// luaL_argcheck
func (L *State) ArgCheck(cond bool, narg int, extramsg string) {
	if cond {
		Cextramsg := C.CString(extramsg)
		defer C.free(unsafe.Pointer(Cextramsg))
		C.luaL_argerror(L.s, C.int(narg), Cextramsg)
	}
}
示例#2
0
文件: lauxlib.go 项目: 1lann/golua
// luaL_argerror
func (L *State) ArgError(narg int, extramsg string) int {
	Cextramsg := C.CString(extramsg)
	defer C.free(unsafe.Pointer(Cextramsg))
	return int(C.luaL_argerror(L.s, C.int(narg), Cextramsg))
}
示例#3
0
文件: lauxlib.go 项目: afitz/golua
func ArgError(L *State, narg int, extramsg string) int {
	return int(C.luaL_argerror(L.s, C.int(narg), C.CString(extramsg)))
}
示例#4
0
func ArgError(L *State, narg int, extramsg string) int {
	Cextramsg := C.CString(extramsg)
	ret := int(C.luaL_argerror(L.s, C.int(narg), Cextramsg))
	C.free(unsafe.Pointer(Cextramsg))
	return ret
}
示例#5
0
文件: lauxlib.go 项目: afitz/golua
func ArgCheck(L *State, cond bool, narg int, extramsg string) {
	if cond {
		C.luaL_argerror(L.s, C.int(narg), C.CString(extramsg))
	}
}