diff options
| author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 1997-11-04 13:27:53 -0200 |
|---|---|---|
| committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 1997-11-04 13:27:53 -0200 |
| commit | 45cad43c3fedb13a5e424429fe94dc78ba01a118 (patch) | |
| tree | e5dae021aa66accc06b6941add38bf2d495c6440 /lapi.c | |
| parent | dad5a01fb07e8a654f195ec3a9ca271cd5ee32e3 (diff) | |
| download | lua-45cad43c3fedb13a5e424429fe94dc78ba01a118.tar.gz lua-45cad43c3fedb13a5e424429fe94dc78ba01a118.tar.bz2 lua-45cad43c3fedb13a5e424429fe94dc78ba01a118.zip | |
"lua_open": now lua has an explicit open operation.
Diffstat (limited to 'lapi.c')
| -rw-r--r-- | lapi.c | 15 |
1 files changed, 14 insertions, 1 deletions
| @@ -1,5 +1,5 @@ | |||
| 1 | /* | 1 | /* |
| 2 | ** $Id: lapi.c,v 1.2 1997/09/26 15:02:26 roberto Exp roberto $ | 2 | ** $Id: lapi.c,v 1.3 1997/10/24 17:17:24 roberto Exp roberto $ |
| 3 | ** Lua API | 3 | ** Lua API |
| 4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
| 5 | */ | 5 | */ |
| @@ -10,9 +10,11 @@ | |||
| 10 | 10 | ||
| 11 | #include "lapi.h" | 11 | #include "lapi.h" |
| 12 | #include "lauxlib.h" | 12 | #include "lauxlib.h" |
| 13 | #include "lbuiltin.h" | ||
| 13 | #include "ldo.h" | 14 | #include "ldo.h" |
| 14 | #include "lfunc.h" | 15 | #include "lfunc.h" |
| 15 | #include "lgc.h" | 16 | #include "lgc.h" |
| 17 | #include "llex.h" | ||
| 16 | #include "lmem.h" | 18 | #include "lmem.h" |
| 17 | #include "lobject.h" | 19 | #include "lobject.h" |
| 18 | #include "lstring.h" | 20 | #include "lstring.h" |
| @@ -544,6 +546,17 @@ lua_Object lua_getref (int ref) | |||
| 544 | } | 546 | } |
| 545 | 547 | ||
| 546 | 548 | ||
| 549 | void lua_open (void) | ||
| 550 | { | ||
| 551 | static int firsttime = 1; | ||
| 552 | if (!firsttime) return; | ||
| 553 | firsttime = 0; | ||
| 554 | luaS_init(); | ||
| 555 | luaX_init(); | ||
| 556 | luaT_init(); | ||
| 557 | luaD_init(); | ||
| 558 | luaB_predefine(); | ||
| 559 | } | ||
| 547 | 560 | ||
| 548 | 561 | ||
| 549 | 562 | ||
