From d5bbe955840c5c83e37ed19df4d392d7ba0970ed Mon Sep 17 00:00:00 2001 From: Roberto I Date: Wed, 22 Jul 2026 13:43:40 -0300 Subject: Details - Some api_checknelems changed to the more restrict api_checkpop. - Added a class to the html for APIs in the manual. - Comments and manual. --- lapi.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'lapi.c') diff --git a/lapi.c b/lapi.c index fb994594..8bc2ddd1 100644 --- a/lapi.c +++ b/lapi.c @@ -1210,7 +1210,7 @@ LUA_API int lua_gc (lua_State *L, int what, ...) { else if (g->GCdebt >= n - MAX_LMEM) /* no overflow? */ newdebt = g->GCdebt - n; else /* overflow */ - newdebt = -MAX_LMEM; /* set debt to miminum value */ + newdebt = -MAX_LMEM; /* set debt to mininum value */ luaE_setdebt(g, newdebt); luaC_condGC(L, (void)0, work = 1); if (work && g->gcstate == GCSpause) /* end of cycle? */ @@ -1299,8 +1299,8 @@ LUA_API void lua_toclose (lua_State *L, int idx) { LUA_API void lua_concat (lua_State *L, int n) { lua_lock(L); - api_checknelems(L, n); if (n > 0) { + api_checkpop(L, n); luaV_concat(L, n); luaC_checkGC(L); } @@ -1418,7 +1418,7 @@ LUA_API const char *lua_setupvalue (lua_State *L, int funcindex, int n) { TValue *fi; lua_lock(L); fi = index2value(L, funcindex); - api_checknelems(L, 1); + api_checkpop(L, 1); name = aux_upvalue(fi, n, &val, &owner); if (name) { L->top.p--; -- cgit v1.2.3-55-g6feb