aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lapi.c6
-rw-r--r--luaconf.h2
-rw-r--r--lvm.c2
-rwxr-xr-xmanual/2html7
-rw-r--r--manual/manual.of10
5 files changed, 18 insertions, 9 deletions
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, ...) {
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
1300LUA_API void lua_concat (lua_State *L, int n) { 1300LUA_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--;
diff --git a/luaconf.h b/luaconf.h
index ea2c0b2e..bdac085c 100644
--- a/luaconf.h
+++ b/luaconf.h
@@ -79,7 +79,7 @@
79#if defined(LUA_USE_MACOSX) 79#if defined(LUA_USE_MACOSX)
80#define LUA_USE_POSIX 80#define LUA_USE_POSIX
81#define LUA_USE_DLOPEN /* macOS does not need -ldl */ 81#define LUA_USE_DLOPEN /* macOS does not need -ldl */
82#define LUA_USE_READLINE 82#define LUA_USE_READLINE /* needs an extra library: -lreadline */
83#endif 83#endif
84 84
85 85
diff --git a/lvm.c b/lvm.c
index f83d47d1..986c7db8 100644
--- a/lvm.c
+++ b/lvm.c
@@ -925,7 +925,7 @@ void luaV_finishOp (lua_State *L) {
925** Macros for arithmetic/bitwise/comparison opcodes in 'luaV_execute' 925** Macros for arithmetic/bitwise/comparison opcodes in 'luaV_execute'
926** 926**
927** All these macros are to be used exclusively inside the main 927** All these macros are to be used exclusively inside the main
928** iterpreter loop (function luaV_execute) and may access directly 928** interpreter loop (function luaV_execute) and may access directly
929** the local variables of that function (L, i, pc, ci, etc.). 929** the local variables of that function (L, i, pc, ci, etc.).
930** =================================================================== 930** ===================================================================
931*/ 931*/
diff --git a/manual/2html b/manual/2html
index 243f3f22..23f37ac6 100755
--- a/manual/2html
+++ b/manual/2html
@@ -58,7 +58,7 @@ end
58 58
59local function compose (f,g) 59local function compose (f,g)
60 assert(f and g) 60 assert(f and g)
61 return function (s) return g(f(s)) end 61 return function (...) return g(f(...)) end
62end 62end
63 63
64local function concat (f, g) 64local function concat (f, g)
@@ -395,9 +395,10 @@ APIEntry = function (e)
395 local apiicmd, ne = string.match(e, "^(.-</span>)(.*)") 395 local apiicmd, ne = string.match(e, "^(.-</span>)(.*)")
396--io.stderr:write(e) 396--io.stderr:write(e)
397 if not apiicmd then 397 if not apiicmd then
398 return antipara(Tag.hr() .. Tag.h3(a)) .. Tag.pre(h) .. e 398 return antipara(Tag.hr() .. Tag.h3(a)) .. Tag.pre(h, {class="api"}) .. e
399 else 399 else
400 return antipara(Tag.hr() .. Tag.h3(a)) .. apiicmd .. Tag.pre(h) .. ne 400 return antipara(Tag.hr() .. Tag.h3(a)) .. apiicmd ..
401 Tag.pre(h, {class="api"}) .. ne
401 end 402 end
402end, 403end,
403 404
diff --git a/manual/manual.of b/manual/manual.of
index 426ad453..e2d1a651 100644
--- a/manual/manual.of
+++ b/manual/manual.of
@@ -1728,7 +1728,7 @@ global X <const>, _G
1728X = 1 -- ERROR 1728X = 1 -- ERROR
1729_ENV.X = 1 -- Ok 1729_ENV.X = 1 -- Ok
1730_G.print(X) -- Ok 1730_G.print(X) -- Ok
1731foo() -- 'foo' can freely change any global 1731foo() -- 'foo' can freely change any global
1732} 1732}
1733 1733
1734A chunk is also a block @see{chunks}, 1734A chunk is also a block @see{chunks},
@@ -6071,6 +6071,14 @@ In both cases,
6071the function pushes onto the stack the final value associated 6071the function pushes onto the stack the final value associated
6072with @id{tname} in the registry. 6072with @id{tname} in the registry.
6073 6073
6074Usage note: Beware the use of the return value of this function to
6075conditionally initializes the new metatable
6076(e.g., by adding metamethods to it).
6077If the initialization raises an error,
6078the metatable will not be properly initialized,
6079but a subsequent execution of that code will detect that the
6080metatable already exists and then skip the initialization.
6081
6074} 6082}
6075 6083
6076@APIEntry{lua_State *luaL_newstate (void);| 6084@APIEntry{lua_State *luaL_newstate (void);|