mirror of
https://github.com/lua/lua
synced 2026-09-29 04:35:58 +03:00
C functions don't need to "pushnil" to return nil value (this is
the default value).
This commit is contained in:
parent
9a3c51cff1
commit
6dfdb76538
3 changed files with 4 additions and 21 deletions
9
table.c
9
table.c
|
|
@ -3,7 +3,7 @@
|
|||
** Module to control static tables
|
||||
*/
|
||||
|
||||
char *rcs_table="$Id: table.c,v 2.55 1996/05/28 21:07:32 roberto Exp roberto $";
|
||||
char *rcs_table="$Id: table.c,v 2.56 1996/06/18 21:12:23 roberto Exp roberto $";
|
||||
|
||||
#include "mem.h"
|
||||
#include "opcode.h"
|
||||
|
|
@ -240,12 +240,7 @@ static void lua_nextvar (void)
|
|||
else
|
||||
next = luaI_findsymbolbyname(lua_getstring(o)) + 1;
|
||||
while (next < lua_ntable && s_tag(next) == LUA_T_NIL) next++;
|
||||
if (next >= lua_ntable)
|
||||
{
|
||||
lua_pushnil();
|
||||
lua_pushnil();
|
||||
}
|
||||
else
|
||||
if (next < lua_ntable)
|
||||
{
|
||||
lua_pushstring(lua_table[next].varname->str);
|
||||
luaI_pushobject(&s_object(next));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue