예제 #1
0
static int luaL_flib_index(lua_State *L) {
  int fres;
  if ((fres = luaR_findfunction(L, flib)) != 0)
    return fres;
    
  return (int)luaO_nilobject;
}
예제 #2
0
static int luaB_index(lua_State *L) {
#if LUA_OPTIMIZE_MEMORY == 2
  int fres;
  if ((fres = luaR_findfunction(L, base_funcs_list)) != 0)
    return fres;
#endif  
  const char *keyname = luaL_checkstring(L, 2);
  if (!c_strcmp(keyname, "_VERSION")) {
    lua_pushliteral(L, LUA_VERSION);
    return 1;
  }
  void *res = luaR_findglobal(keyname, c_strlen(keyname));
  if (!res)
    return 0;
  else {
    lua_pushrotable(L, res);
    return 1;
  }
}
예제 #3
0
static int luaL_index(lua_State *L) {
    return luaR_findfunction(L, iolib_funcs);
}
예제 #4
0
static int flib_index(lua_State *L)
{
  return luaR_findfunction(L, flib_funcs);
}