Exemple #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
}
Exemple #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
}
Exemple #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
}