torch1/exe/luajit-rocks/luajit-2.1/src/luajit.c
/* Get field from object on top of stack. Avoid calling metamethods. */
Get field from object on top of stack. Avoid calling metamethods.
Get field from object on top of stack . Avoid calling metamethods .
static int lua_rl_getfield(lua_State *L, const char *s, size_t n)
{
  int i = 20;  
  do {
    if (lua_istable(L, -1)) {
      lua_pushlstring(L, s, n);
      lua_rawget(L, -2);
      if (!lua_isnil(L, -1)) { lua_replace(L, -2); return 1; }
      lua_pop(L, 1);
    }
  } while (--i > 0 && lua_rl_getmetaindex(L));
  lua_pop(L, 1);
  return 0;
}
static int lua_rl_getfield ( lua_State * L , const char * s , size_t n ) { int i = 20 ; do { if ( lua_istable ( L , -1 ) ) { lua_pushlstring ( L , s , n ) ; lua_rawget ( L , -2 ) ; if ( ! lua_isnil ( L , -1 ) ) { lua_replace ( L , -2 ) ; return 1 ; } lua_pop ( L , 1 ) ; } } while ( -- i > 0 && lua_rl_getmetaindex ( L ) ) ; lua_pop ( L , 1 ) ; return 0 ; }
Get field from object on top of stack.
Get field from object on top of stack .
/* Avoid infinite metatable loops. */