mirror of
https://github.com/lua/lua.git
synced 2025-07-04 15:09:38 +00:00
explicit stack control in the API
This commit is contained in:
parent
4135f4f586
commit
a97f29f154
7 changed files with 27 additions and 16 deletions
3
liolib.c
3
liolib.c
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
** $Id: liolib.c,v 1.72 2000/08/28 17:57:04 roberto Exp roberto $
|
||||
** $Id: liolib.c,v 1.73 2000/08/29 14:33:31 roberto Exp roberto $
|
||||
** Standard I/O (and system) library
|
||||
** See Copyright Notice in lua.h
|
||||
*/
|
||||
|
@ -372,6 +372,7 @@ 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");
|
||||
for (n = firstarg; n<=lastarg; n++) {
|
||||
size_t l;
|
||||
int success;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue