diff options
| author | Roberto I <roberto@inf.puc-rio.br> | 2026-07-22 13:43:40 -0300 |
|---|---|---|
| committer | Roberto I <roberto@inf.puc-rio.br> | 2026-07-22 13:43:40 -0300 |
| commit | d5bbe955840c5c83e37ed19df4d392d7ba0970ed (patch) | |
| tree | 35977691aabb3a65e96508d4277c2067991ee4e3 /lapi.c | |
| parent | 9130ceb19d324472d135e8e644a01e8b16334c31 (diff) | |
| download | lua-d5bbe955840c5c83e37ed19df4d392d7ba0970ed.tar.gz lua-d5bbe955840c5c83e37ed19df4d392d7ba0970ed.tar.bz2 lua-d5bbe955840c5c83e37ed19df4d392d7ba0970ed.zip | |
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.
Diffstat (limited to 'lapi.c')
| -rw-r--r-- | lapi.c | 6 |
1 files changed, 3 insertions, 3 deletions
| @@ -1210,7 +1210,7 @@ LUA_API int lua_gc (lua_State *L, int what, ...) { | |||
| 1210 | else if (g->GCdebt >= n - MAX_LMEM) /* no overflow? */ | 1210 | else if (g->GCdebt >= n - MAX_LMEM) /* no overflow? */ |
| 1211 | newdebt = g->GCdebt - n; | 1211 | newdebt = g->GCdebt - n; |
| 1212 | else /* overflow */ | 1212 | else /* overflow */ |
| 1213 | newdebt = -MAX_LMEM; /* set debt to miminum value */ | 1213 | newdebt = -MAX_LMEM; /* set debt to mininum value */ |
| 1214 | luaE_setdebt(g, newdebt); | 1214 | luaE_setdebt(g, newdebt); |
| 1215 | luaC_condGC(L, (void)0, work = 1); | 1215 | luaC_condGC(L, (void)0, work = 1); |
| 1216 | if (work && g->gcstate == GCSpause) /* end of cycle? */ | 1216 | if (work && g->gcstate == GCSpause) /* end of cycle? */ |
| @@ -1299,8 +1299,8 @@ LUA_API void lua_toclose (lua_State *L, int idx) { | |||
| 1299 | 1299 | ||
| 1300 | LUA_API void lua_concat (lua_State *L, int n) { | 1300 | LUA_API void lua_concat (lua_State *L, int n) { |
| 1301 | lua_lock(L); | 1301 | lua_lock(L); |
| 1302 | api_checknelems(L, n); | ||
| 1303 | if (n > 0) { | 1302 | if (n > 0) { |
| 1303 | api_checkpop(L, n); | ||
| 1304 | luaV_concat(L, n); | 1304 | luaV_concat(L, n); |
| 1305 | luaC_checkGC(L); | 1305 | luaC_checkGC(L); |
| 1306 | } | 1306 | } |
| @@ -1418,7 +1418,7 @@ LUA_API const char *lua_setupvalue (lua_State *L, int funcindex, int n) { | |||
| 1418 | TValue *fi; | 1418 | TValue *fi; |
| 1419 | lua_lock(L); | 1419 | lua_lock(L); |
| 1420 | fi = index2value(L, funcindex); | 1420 | fi = index2value(L, funcindex); |
| 1421 | api_checknelems(L, 1); | 1421 | api_checkpop(L, 1); |
| 1422 | name = aux_upvalue(fi, n, &val, &owner); | 1422 | name = aux_upvalue(fi, n, &val, &owner); |
| 1423 | if (name) { | 1423 | if (name) { |
| 1424 | L->top.p--; | 1424 | L->top.p--; |
