summaryrefslogtreecommitdiff
path: root/loslib.c
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2010-07-02 08:38:13 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2010-07-02 08:38:13 -0300
commit7192afafeeb1a96b3de60af90a72cd8762b09d94 (patch)
treed1e7e061822f755c33cc497d98ea451c7e7e32e8 /loslib.c
parenta139e2e003e0b62b7d34eeda20dd2354e74885f9 (diff)
downloadlua-github-7192afafeeb1a96b3de60af90a72cd8762b09d94.tar.gz
new module policy: C modules do not create globals and do not register
themselves with 'require' (let 'require' do its work); new auxiliary functions luaL_newlib/luaL_newlibtable/luaL_setfuncs/luaL_requiref. Old luaL_register will be deprecated.
Diffstat (limited to 'loslib.c')
-rw-r--r--loslib.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/loslib.c b/loslib.c
index c51ce5eb..2c378e9b 100644
--- a/loslib.c
+++ b/loslib.c
@@ -1,5 +1,5 @@
/*
-** $Id: loslib.c,v 1.28 2009/12/17 12:26:09 roberto Exp roberto $
+** $Id: loslib.c,v 1.29 2009/12/17 13:08:51 roberto Exp roberto $
** Standard Operating System library
** See Copyright Notice in lua.h
*/
@@ -304,7 +304,7 @@ static const luaL_Reg syslib[] = {
LUAMOD_API int luaopen_os (lua_State *L) {
- luaL_register(L, LUA_OSLIBNAME, syslib);
+ luaL_newlib(L, syslib);
return 1;
}