aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2000-10-17 11:36:24 -0200
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2000-10-17 11:36:24 -0200
commite93c4547fe632ccae0b48d4d7eaccd79512aa2a0 (patch)
treec8380b8c72cddf8aa496b42606fa01b093026a1f
parent0ffc676ce7ea4764f3277ce87967ef14ad323933 (diff)
downloadlua-e93c4547fe632ccae0b48d4d7eaccd79512aa2a0.tar.gz
lua-e93c4547fe632ccae0b48d4d7eaccd79512aa2a0.tar.bz2
lua-e93c4547fe632ccae0b48d4d7eaccd79512aa2a0.zip
no more USERINIT (macro)
-rw-r--r--lua.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/lua.c b/lua.c
index af599ffa..1bd9a4bc 100644
--- a/lua.c
+++ b/lua.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: lua.c,v 1.52 2000/09/25 16:15:52 roberto Exp roberto $ 2** $Id: lua.c,v 1.53 2000/10/09 15:46:43 roberto Exp roberto $
3** Lua stand-alone interpreter 3** Lua stand-alone interpreter
4** See Copyright Notice in lua.h 4** See Copyright Notice in lua.h
5*/ 5*/
@@ -48,18 +48,14 @@ static lua_Hook old_linehook = NULL;
48static lua_Hook old_callhook = NULL; 48static lua_Hook old_callhook = NULL;
49 49
50 50
51#ifdef USERINIT
52extern void USERINIT (void);
53#else
54#define USERINIT userinit
55static void userinit (void) { 51static void userinit (void) {
56 lua_baselibopen(L); 52 lua_baselibopen(L);
57 lua_iolibopen(L); 53 lua_iolibopen(L);
58 lua_strlibopen(L); 54 lua_strlibopen(L);
59 lua_mathlibopen(L); 55 lua_mathlibopen(L);
60 lua_dblibopen(L); 56 lua_dblibopen(L);
57 /* add your libraries here */
61} 58}
62#endif
63 59
64 60
65static handler lreset (void) { 61static handler lreset (void) {
@@ -316,7 +312,7 @@ int main (int argc, char *argv[]) {
316 opt.toclose = 0; 312 opt.toclose = 0;
317 getstacksize(argc, argv, &opt); /* handle option `-s' */ 313 getstacksize(argc, argv, &opt); /* handle option `-s' */
318 L = lua_open(opt.stacksize); /* create state */ 314 L = lua_open(opt.stacksize); /* create state */
319 USERINIT(); /* open libraries */ 315 userinit(); /* open libraries */
320 register_getargs(argv); /* create `getargs' function */ 316 register_getargs(argv); /* create `getargs' function */
321 status = handle_argv(argv+1, &opt); 317 status = handle_argv(argv+1, &opt);
322 if (opt.toclose) 318 if (opt.toclose)