diff options
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); |
