Example #1
0
// 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)
	}
}
Example #2
0
// 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))
}
Example #3
0
func ArgError(L *State, narg int, extramsg string) int {
	return int(C.luaL_argerror(L.s, C.int(narg), C.CString(extramsg)))
}
Example #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
}
Example #5
0
func ArgCheck(L *State, cond bool, narg int, extramsg string) {
	if cond {
		C.luaL_argerror(L.s, C.int(narg), C.CString(extramsg))
	}
}