aboutsummaryrefslogtreecommitdiff
path: root/linit.c
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2016-12-04 18:17:24 -0200
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2016-12-04 18:17:24 -0200
commitb2aa2ba046502bdcdfa3de4af898810667c1843a (patch)
tree9d9d4ad6c8e2040996fa4147d59fcb79d1a6d777 /linit.c
parentbeec5af2010ad0df9d95b0aaa4842ded1ac60d8a (diff)
downloadlua-b2aa2ba046502bdcdfa3de4af898810667c1843a.tar.gz
lua-b2aa2ba046502bdcdfa3de4af898810667c1843a.tar.bz2
lua-b2aa2ba046502bdcdfa3de4af898810667c1843a.zip
using constants for "_LOADED" and "PRELOAD"
Diffstat (limited to 'linit.c')
-rw-r--r--linit.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/linit.c b/linit.c
index b2142da5..897ae352 100644
--- a/linit.c
+++ b/linit.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: linit.c,v 1.37 2014/12/09 15:00:17 roberto Exp roberto $ 2** $Id: linit.c,v 1.38 2015/01/05 13:48:33 roberto Exp roberto $
3** Initialization of libraries for lua.c and other clients 3** Initialization of libraries for lua.c and other clients
4** See Copyright Notice in lua.h 4** See Copyright Notice in lua.h
5*/ 5*/
@@ -18,10 +18,10 @@
18** open the library, which is already linked to the application. 18** open the library, which is already linked to the application.
19** For that, do the following code: 19** For that, do the following code:
20** 20**
21** luaL_getsubtable(L, LUA_REGISTRYINDEX, "_PRELOAD"); 21** luaL_getsubtable(L, LUA_REGISTRYINDEX, LUA_PRELOAD_TABLE);
22** lua_pushcfunction(L, luaopen_modname); 22** lua_pushcfunction(L, luaopen_modname);
23** lua_setfield(L, -2, modname); 23** lua_setfield(L, -2, modname);
24** lua_pop(L, 1); // remove _PRELOAD table 24** lua_pop(L, 1); // remove PRELOAD table
25*/ 25*/
26 26
27#include "lprefix.h" 27#include "lprefix.h"