diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2020-02-27 12:59:22 -0300 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2020-02-27 12:59:22 -0300 |
commit | 6eb53b752617fae9e1329bfe2cfecdcbb593c398 (patch) | |
tree | c392ef632bbcfbf7b3716f5c6c17b06617bca8da /lauxlib.c | |
parent | 9b7987a9d1471ba94764286b28e0998f73deb46a (diff) | |
download | lua-6eb53b752617fae9e1329bfe2cfecdcbb593c398.tar.gz lua-6eb53b752617fae9e1329bfe2cfecdcbb593c398.tar.bz2 lua-6eb53b752617fae9e1329bfe2cfecdcbb593c398.zip |
Details
Several details in code (e.g., moving a variable to the most inner
scope that encloses its uses), comments, parameter names, extra tests.
Diffstat (limited to 'lauxlib.c')
-rw-r--r-- | lauxlib.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -902,10 +902,10 @@ LUALIB_API const char *luaL_tolstring (lua_State *L, int idx, size_t *len) { | |||
902 | LUALIB_API void luaL_setfuncs (lua_State *L, const luaL_Reg *l, int nup) { | 902 | LUALIB_API void luaL_setfuncs (lua_State *L, const luaL_Reg *l, int nup) { |
903 | luaL_checkstack(L, nup, "too many upvalues"); | 903 | luaL_checkstack(L, nup, "too many upvalues"); |
904 | for (; l->name != NULL; l++) { /* fill the table with given functions */ | 904 | for (; l->name != NULL; l++) { /* fill the table with given functions */ |
905 | int i; | ||
906 | if (l->func == NULL) /* place holder? */ | 905 | if (l->func == NULL) /* place holder? */ |
907 | lua_pushboolean(L, 0); | 906 | lua_pushboolean(L, 0); |
908 | else { | 907 | else { |
908 | int i; | ||
909 | for (i = 0; i < nup; i++) /* copy upvalues to the top */ | 909 | for (i = 0; i < nup; i++) /* copy upvalues to the top */ |
910 | lua_pushvalue(L, -nup); | 910 | lua_pushvalue(L, -nup); |
911 | lua_pushcclosure(L, l->func, nup); /* closure with those upvalues */ | 911 | lua_pushcclosure(L, l->func, nup); /* closure with those upvalues */ |