Esempio n. 1
0
//returns false if no such metatable or no such field
func GetMetaField(L *State, obj int, e string) bool {
	Ce := C.CString(e)
	ret := C.luaL_getmetafield(L.s, C.int(obj), Ce) != 0
	C.free(unsafe.Pointer(Ce))
	return ret
}
Esempio n. 2
0
// luaL_getmetafield
func (L *State) GetMetaField(obj int, e string) bool {
	Ce := C.CString(e)
	defer C.free(unsafe.Pointer(Ce))
	return C.luaL_getmetafield(L.s, C.int(obj), Ce) != 0
}
Esempio n. 3
0
//returns false if no such metatable or no such field
func GetMetaField(L *State, obj int, e string) bool {
	return C.luaL_getmetafield(L.s, C.int(obj), C.CString(e)) != 0
}