Re: Similar issue with 'luaL_newmetatable' in I/O standard library

Jure Bagić <[email protected]> Mon, 20 Jul 2026 23:36:32 +0200
Newsgroups gmane.comp.lang.lua.general
Message-ID <[email protected]>
This is a multi-part message in MIME format.
--------------V9xpJTNKbJlvy24RfZb0p0W1
Content-Type: text/plain; charset="UTF-8"; format=flowed

Additionally, shouldn't 'lua_setupvalue' have 'api_checkpop' and not 
'api_checknelems'?

And in 'lua_concat'

   lua_lock(L);
   api_checknelems(L, n);
   if (n > 0) {
+   api_checkpop(L, n - 1);
     luaV_concat(L, n);
     luaC_checkGC(L);
   }
   ...

Or am I missing something?

-- Jure

-- 
You received this message because you are subscribed to the Google Groups "lua-l" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
To view this discussion visit https://groups.google.com/d/msgid/lua-l/e09e82b7-12e3-453c-95cc-d7fa51b72b55%40gmail.com.

--------------V9xpJTNKbJlvy24RfZb0p0W1
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE html>
<html>
  <head>
    <meta http-equiv=3D"Content-Type" content=3D"text/html; charset=3DUTF-8=
">
  </head>
  <body>
    <p><font face=3D"Inter Variable">Additionally, shouldn't
        'lua_setupvalue' have 'api_checkpop' and not 'api_checknelems'?</fo=
nt></p>
    <p><font face=3D"Inter Variable">And in 'lua_concat'</font></p>
    <pre>  lua_lock(L);
  api_checknelems(L, n);
  if (n &gt; 0) {
+   api_checkpop(L, n - 1);
    luaV_concat(L, n);
    luaC_checkGC(L);
  }
  ...<font face=3D"Inter Variable">
</font></pre>
    <p><font face=3D"Inter Variable">Or am I missing something?</font></p>
    <p>-- Jure</p>
  </body>
</html>

<p></p>

-- <br />
You received this message because you are subscribed to the Google Groups &=
quot;lua-l&quot; group.<br />
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to <a href=3D"mailto:[email protected]">lua-l+unsubsc=
[email protected]</a>.<br />
To view this discussion visit <a href=3D"https://groups.google.com/d/msgid/=
lua-l/e09e82b7-12e3-453c-95cc-d7fa51b72b55%40gmail.com?utm_medium=3Demail&u=
tm_source=3Dfooter">https://groups.google.com/d/msgid/lua-l/e09e82b7-12e3-4=
53c-95cc-d7fa51b72b55%40gmail.com</a>.<br />

--------------V9xpJTNKbJlvy24RfZb0p0W1--