diff options
| author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2003-05-16 15:59:08 -0300 |
|---|---|---|
| committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2003-05-16 15:59:08 -0300 |
| commit | 60aa01d8f7f3be01c71b12972d42c915ae1d045e (patch) | |
| tree | d703654bfd1d113d2a4fbae9e078e364362ac191 /lauxlib.c | |
| parent | ecf5730c0cc2dde4006a0dded0cf3dd241636cba (diff) | |
| download | lua-60aa01d8f7f3be01c71b12972d42c915ae1d045e.tar.gz lua-60aa01d8f7f3be01c71b12972d42c915ae1d045e.tar.bz2 lua-60aa01d8f7f3be01c71b12972d42c915ae1d045e.zip | |
fully-weak tables are more efficient
Diffstat (limited to 'lauxlib.c')
| -rw-r--r-- | lauxlib.c | 6 |
1 files changed, 3 insertions, 3 deletions
| @@ -1,5 +1,5 @@ | |||
| 1 | /* | 1 | /* |
| 2 | ** $Id: lauxlib.c,v 1.100 2003/04/07 14:35:00 roberto Exp roberto $ | 2 | ** $Id: lauxlib.c,v 1.101 2003/05/15 12:20:24 roberto Exp roberto $ |
| 3 | ** Auxiliary functions for building Lua libraries | 3 | ** Auxiliary functions for building Lua libraries |
| 4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
| 5 | */ | 5 | */ |
| @@ -271,8 +271,8 @@ static void getsizes (lua_State *L) { | |||
| 271 | lua_pushvalue(L, -1); /* `size' will be its own metatable */ | 271 | lua_pushvalue(L, -1); /* `size' will be its own metatable */ |
| 272 | lua_setmetatable(L, -2); | 272 | lua_setmetatable(L, -2); |
| 273 | lua_pushliteral(L, "__mode"); | 273 | lua_pushliteral(L, "__mode"); |
| 274 | lua_pushliteral(L, "k"); | 274 | lua_pushliteral(L, "kv"); |
| 275 | lua_rawset(L, -3); /* metatable(N).__mode = "k" */ | 275 | lua_rawset(L, -3); /* metatable(N).__mode = "kv" */ |
| 276 | lua_pushvalue(L, -1); | 276 | lua_pushvalue(L, -1); |
| 277 | lua_rawseti(L, LUA_REGISTRYINDEX, ARRAYSIZE_REF); /* store in register */ | 277 | lua_rawseti(L, LUA_REGISTRYINDEX, ARRAYSIZE_REF); /* store in register */ |
| 278 | } | 278 | } |
