exe/lua/src/lua.c
/* Get __index field of metatable of object on top of stack. */
Get __index field of metatable of object on top of stack.
Get __index field of metatable of object on top of stack .
static int lua_rl_getmetaindex(lua_State *L)
{
  if (!lua_getmetatable(L, -1)) { lua_pop(L, 1); return 0; }
  lua_pushstring(L, "__index");
  lua_rawget(L, -2);
  lua_replace(L, -2);
  if (lua_isnil(L, -1) || lua_rawequal(L, -1, -2)) { lua_pop(L, 2); return 0; }
  lua_replace(L, -2);
  return 1;
}
static int lua_rl_getmetaindex ( lua_State * L ) { if ( ! lua_getmetatable ( L , -1 ) ) { lua_pop ( L , 1 ) ; return 0 ; } lua_pushstring ( L , " " ) ; lua_rawget ( L , -2 ) ; lua_replace ( L , -2 ) ; if ( lua_isnil ( L , -1 ) || lua_rawequal ( L , -1 , -2 ) ) { lua_pop ( L , 2 ) ; return 0 ; } lua_replace ( L , -2 ) ; return 1 ; }
Get __index field of metatable of object on top of stack.
Get __index field of metatable of object on top of stack .