diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2000-10-17 11:36:24 -0200 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2000-10-17 11:36:24 -0200 |
commit | e93c4547fe632ccae0b48d4d7eaccd79512aa2a0 (patch) | |
tree | c8380b8c72cddf8aa496b42606fa01b093026a1f | |
parent | 0ffc676ce7ea4764f3277ce87967ef14ad323933 (diff) | |
download | lua-e93c4547fe632ccae0b48d4d7eaccd79512aa2a0.tar.gz lua-e93c4547fe632ccae0b48d4d7eaccd79512aa2a0.tar.bz2 lua-e93c4547fe632ccae0b48d4d7eaccd79512aa2a0.zip |
no more USERINIT (macro)
-rw-r--r-- | lua.c | 10 |
1 files changed, 3 insertions, 7 deletions
@@ -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; | |||
48 | static lua_Hook old_callhook = NULL; | 48 | static lua_Hook old_callhook = NULL; |
49 | 49 | ||
50 | 50 | ||
51 | #ifdef USERINIT | ||
52 | extern void USERINIT (void); | ||
53 | #else | ||
54 | #define USERINIT userinit | ||
55 | static void userinit (void) { | 51 | static 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 | ||
65 | static handler lreset (void) { | 61 | static 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) |