mirror of
https://github.com/lua/lua.git
synced 2025-07-04 15:09:38 +00:00
details
This commit is contained in:
parent
a0de89d62a
commit
10b4799ce5
1 changed files with 4 additions and 3 deletions
7
liolib.c
7
liolib.c
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
** $Id: liolib.c,v 1.73 2000/08/29 14:33:31 roberto Exp roberto $
|
||||
** $Id: liolib.c,v 1.74 2000/08/29 20:43:28 roberto Exp roberto $
|
||||
** Standard I/O (and system) library
|
||||
** See Copyright Notice in lua.h
|
||||
*/
|
||||
|
@ -159,7 +159,7 @@ static int file_collect (lua_State *L) {
|
|||
IOCtrl *ctrl = (IOCtrl *)lua_touserdata(L, -1);
|
||||
lua_settop(L, -1); /* remove upvalue */
|
||||
if (ctrl == (IOCtrl *)lua_touserdata(L, 1)) {
|
||||
/* collectig `ctrl' itself */
|
||||
/* collecting `ctrl' itself */
|
||||
lua_unref(L, ctrl->ref[INFILE]);
|
||||
lua_unref(L, ctrl->ref[OUTFILE]);
|
||||
free(ctrl);
|
||||
|
@ -372,7 +372,8 @@ static int io_read (lua_State *L) {
|
|||
firstarg = lastarg = 1; /* correct indices */
|
||||
lua_pushstring(L, "*l"); /* push default argument */
|
||||
}
|
||||
luaL_checkstack(L, lastarg-firstarg+1, "too many results");
|
||||
else
|
||||
luaL_checkstack(L, lastarg-firstarg+1, "too many arguments");
|
||||
for (n = firstarg; n<=lastarg; n++) {
|
||||
size_t l;
|
||||
int success;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue