diff options
| author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2005-04-13 14:24:20 -0300 |
|---|---|---|
| committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2005-04-13 14:24:20 -0300 |
| commit | 04f657c7f892072d7cdc021e9e2635acc086f898 (patch) | |
| tree | f5cd7c82ae0152a1b252511f85b58296590eca04 /loadlib.c | |
| parent | 2873d4efff18e972a94a6d20c231b0ac062bc4ca (diff) | |
| download | lua-04f657c7f892072d7cdc021e9e2635acc086f898.tar.gz lua-04f657c7f892072d7cdc021e9e2635acc086f898.tar.bz2 lua-04f657c7f892072d7cdc021e9e2635acc086f898.zip | |
new protocol to open standard libraries
Diffstat (limited to 'loadlib.c')
| -rw-r--r-- | loadlib.c | 4 |
1 files changed, 2 insertions, 2 deletions
| @@ -1,5 +1,5 @@ | |||
| 1 | /* | 1 | /* |
| 2 | ** $Id: loadlib.c,v 1.24 2005/03/29 16:20:48 roberto Exp roberto $ | 2 | ** $Id: loadlib.c,v 1.25 2005/03/30 19:50:29 roberto Exp roberto $ |
| 3 | ** Dynamic library loader for Lua | 3 | ** Dynamic library loader for Lua |
| 4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
| 5 | ** | 5 | ** |
| @@ -474,7 +474,7 @@ LUALIB_API int luaopen_loadlib (lua_State *L) { | |||
| 474 | /* create `package' table */ | 474 | /* create `package' table */ |
| 475 | lua_newtable(L); | 475 | lua_newtable(L); |
| 476 | lua_pushvalue(L, -1); | 476 | lua_pushvalue(L, -1); |
| 477 | lua_setglobal(L, "package"); | 477 | lua_setglobal(L, LUA_LOADLIBNAME); |
| 478 | lua_pushvalue(L, -1); | 478 | lua_pushvalue(L, -1); |
| 479 | lua_setfield(L, LUA_REGISTRYINDEX, "_PACKAGE"); | 479 | lua_setfield(L, LUA_REGISTRYINDEX, "_PACKAGE"); |
| 480 | lua_pushvalue(L, -1); | 480 | lua_pushvalue(L, -1); |
