瀏覽代碼

smaller initial tables (for programs that create many states)

Roberto Ierusalimschy 20 年之前
父節點
當前提交
361a9adba7
共有 1 個文件被更改,包括 3 次插入3 次删除
  1. 3 3
      lstate.c

+ 3 - 3
lstate.c

@@ -1,5 +1,5 @@
 /*
 /*
-** $Id: lstate.c,v 2.32 2005/06/03 20:15:58 roberto Exp roberto $
+** $Id: lstate.c,v 2.33 2005/08/25 15:39:16 roberto Exp roberto $
 ** Global State
 ** Global State
 ** See Copyright Notice in lua.h
 ** See Copyright Notice in lua.h
 */
 */
@@ -71,8 +71,8 @@ static void f_luaopen (lua_State *L, void *ud) {
   global_State *g = G(L);
   global_State *g = G(L);
   UNUSED(ud);
   UNUSED(ud);
   stack_init(L, L);  /* init stack */
   stack_init(L, L);  /* init stack */
-  sethvalue(L, gt(L), luaH_new(L, 0, 20));  /* table of globals */
-  sethvalue(L, registry(L), luaH_new(L, 6, 20));  /* registry */
+  sethvalue(L, gt(L), luaH_new(L, 0, 2));  /* table of globals */
+  sethvalue(L, registry(L), luaH_new(L, 0, 2));  /* registry */
   luaS_resize(L, MINSTRTABSIZE);  /* initial size of string table */
   luaS_resize(L, MINSTRTABSIZE);  /* initial size of string table */
   luaT_init(L);
   luaT_init(L);
   luaX_init(L);
   luaX_init(L);