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. --- manual/2html | 7 ++++--- manual/manual.of | 10 +++++++++- 2 files changed, 13 insertions(+), 4 deletions(-) (limited to 'manual') diff --git a/manual/2html b/manual/2html index 243f3f22..23f37ac6 100755 --- a/manual/2html +++ b/manual/2html @@ -58,7 +58,7 @@ end local function compose (f,g) assert(f and g) - return function (s) return g(f(s)) end + return function (...) return g(f(...)) end end local function concat (f, g) @@ -395,9 +395,10 @@ APIEntry = function (e) local apiicmd, ne = string.match(e, "^(.-)(.*)") --io.stderr:write(e) if not apiicmd then - return antipara(Tag.hr() .. Tag.h3(a)) .. Tag.pre(h) .. e + return antipara(Tag.hr() .. Tag.h3(a)) .. Tag.pre(h, {class="api"}) .. e else - return antipara(Tag.hr() .. Tag.h3(a)) .. apiicmd .. Tag.pre(h) .. ne + return antipara(Tag.hr() .. Tag.h3(a)) .. apiicmd .. + Tag.pre(h, {class="api"}) .. ne end end, 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 , _G X = 1 -- ERROR _ENV.X = 1 -- Ok _G.print(X) -- Ok -foo() -- 'foo' can freely change any global +foo() -- 'foo' can freely change any global } A chunk is also a block @see{chunks}, @@ -6071,6 +6071,14 @@ In both cases, the function pushes onto the stack the final value associated with @id{tname} in the registry. +Usage note: Beware the use of the return value of this function to +conditionally initializes the new metatable +(e.g., by adding metamethods to it). +If the initialization raises an error, +the metatable will not be properly initialized, +but a subsequent execution of that code will detect that the +metatable already exists and then skip the initialization. + } @APIEntry{lua_State *luaL_newstate (void);| -- cgit v1.2.3-55-g6feb