diff options
| author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2002-06-05 14:24:04 -0300 |
|---|---|---|
| committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2002-06-05 14:24:04 -0300 |
| commit | 5b8ee9fa8d9bc3d3ad41a1acd547b79bc3b669a7 (patch) | |
| tree | e9d62d00cd762b64e30ce2297319f91064d54d7e /liolib.c | |
| parent | 2cd6161060f3e9149e7a61a126bec76cd4f1b333 (diff) | |
| download | lua-5b8ee9fa8d9bc3d3ad41a1acd547b79bc3b669a7.tar.gz lua-5b8ee9fa8d9bc3d3ad41a1acd547b79bc3b669a7.tar.bz2 lua-5b8ee9fa8d9bc3d3ad41a1acd547b79bc3b669a7.zip | |
new names for standard libraries
Diffstat (limited to 'liolib.c')
| -rw-r--r-- | liolib.c | 8 |
1 files changed, 4 insertions, 4 deletions
| @@ -1,5 +1,5 @@ | |||
| 1 | /* | 1 | /* |
| 2 | ** $Id: liolib.c,v 2.5 2002/05/06 19:05:10 roberto Exp roberto $ | 2 | ** $Id: liolib.c,v 2.6 2002/06/05 16:59:37 roberto Exp roberto $ |
| 3 | ** Standard I/O (and system) library | 3 | ** Standard I/O (and system) library |
| 4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
| 5 | */ | 5 | */ |
| @@ -594,12 +594,12 @@ static const luaL_reg syslib[] = { | |||
| 594 | 594 | ||
| 595 | LUALIB_API int lua_iolibopen (lua_State *L) { | 595 | LUALIB_API int lua_iolibopen (lua_State *L) { |
| 596 | createmeta(L); | 596 | createmeta(L); |
| 597 | luaL_opennamedlib(L, "os", syslib, 0); | 597 | luaL_opennamedlib(L, LUA_OSLIBNAME, syslib, 0); |
| 598 | lua_pushliteral(L, FILEHANDLE); /* S: FH */ | 598 | lua_pushliteral(L, FILEHANDLE); /* S: FH */ |
| 599 | lua_rawget(L, LUA_REGISTRYINDEX); /* S: mt */ | 599 | lua_rawget(L, LUA_REGISTRYINDEX); /* S: mt */ |
| 600 | lua_pushvalue(L, -1); /* S: mt mt */ | 600 | lua_pushvalue(L, -1); /* S: mt mt */ |
| 601 | luaL_opennamedlib(L, "io", iolib, 1); /* S: mt */ | 601 | luaL_opennamedlib(L, LUA_IOLIBNAME, iolib, 1); /* S: mt */ |
| 602 | lua_pushliteral(L, "io"); /* S: `io' mt */ | 602 | lua_pushliteral(L, LUA_IOLIBNAME); /* S: `io' mt */ |
| 603 | lua_gettable(L, LUA_GLOBALSINDEX); /* S: io mt */ | 603 | lua_gettable(L, LUA_GLOBALSINDEX); /* S: io mt */ |
| 604 | /* put predefined file handles into `io' table */ | 604 | /* put predefined file handles into `io' table */ |
| 605 | registerfile(L, stdin, "stdin", IO_INPUT); | 605 | registerfile(L, stdin, "stdin", IO_INPUT); |
