aboutsummaryrefslogtreecommitdiff
path: root/lauxlib.c
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2020-02-27 12:59:22 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2020-02-27 12:59:22 -0300
commit6eb53b752617fae9e1329bfe2cfecdcbb593c398 (patch)
treec392ef632bbcfbf7b3716f5c6c17b06617bca8da /lauxlib.c
parent9b7987a9d1471ba94764286b28e0998f73deb46a (diff)
downloadlua-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.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lauxlib.c b/lauxlib.c
index b6740b17..72359094 100644
--- a/lauxlib.c
+++ b/lauxlib.c
@@ -902,10 +902,10 @@ LUALIB_API const char *luaL_tolstring (lua_State *L, int idx, size_t *len) {
902LUALIB_API void luaL_setfuncs (lua_State *L, const luaL_Reg *l, int nup) { 902LUALIB_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 */