diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2005-08-15 11:12:32 -0300 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2005-08-15 11:12:32 -0300 |
commit | 5e8a9e324ccdba03b326f8a8fafa0446042975a5 (patch) | |
tree | 0f752977249376dffd9a65690c1663be81166825 /liolib.c | |
parent | 16ddf86168998d500283e160977ef5ecea72c915 (diff) | |
download | lua-5e8a9e324ccdba03b326f8a8fafa0446042975a5.tar.gz lua-5e8a9e324ccdba03b326f8a8fafa0446042975a5.tar.bz2 lua-5e8a9e324ccdba03b326f8a8fafa0446042975a5.zip |
luaL_openlib -> luaL_register, luaL_putchar -> luaL_addchar
Diffstat (limited to 'liolib.c')
-rw-r--r-- | liolib.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: liolib.c,v 2.63 2005/06/06 18:42:21 roberto Exp roberto $ | 2 | ** $Id: liolib.c,v 2.64 2005/07/12 14:32:08 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 | */ |
@@ -493,7 +493,7 @@ static void createmeta (lua_State *L) { | |||
493 | luaL_newmetatable(L, LUA_FILEHANDLE); /* create metatable for file handles */ | 493 | luaL_newmetatable(L, LUA_FILEHANDLE); /* create metatable for file handles */ |
494 | lua_pushvalue(L, -1); /* push metatable */ | 494 | lua_pushvalue(L, -1); /* push metatable */ |
495 | lua_setfield(L, -2, "__index"); /* metatable.__index = metatable */ | 495 | lua_setfield(L, -2, "__index"); /* metatable.__index = metatable */ |
496 | luaL_openlib(L, NULL, flib, 0); /* file methods */ | 496 | luaL_register(L, NULL, flib); /* file methods */ |
497 | } | 497 | } |
498 | 498 | ||
499 | 499 | ||
@@ -513,7 +513,7 @@ LUALIB_API int luaopen_io (lua_State *L) { | |||
513 | lua_newtable(L); | 513 | lua_newtable(L); |
514 | lua_replace(L, LUA_ENVIRONINDEX); | 514 | lua_replace(L, LUA_ENVIRONINDEX); |
515 | /* open library */ | 515 | /* open library */ |
516 | luaL_openlib(L, LUA_IOLIBNAME, iolib, 0); | 516 | luaL_register(L, LUA_IOLIBNAME, iolib); |
517 | /* create (and set) default files */ | 517 | /* create (and set) default files */ |
518 | createstdfile(L, stdin, IO_INPUT, "stdin"); | 518 | createstdfile(L, stdin, IO_INPUT, "stdin"); |
519 | createstdfile(L, stdout, IO_OUTPUT, "stdout"); | 519 | createstdfile(L, stdout, IO_OUTPUT, "stdout"); |