mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-05-28 00:02:28 +00:00
Upgrade Lua to 5.4.3 (#217)
Based on https://github.com/lua/lua/releases/tag/v5.4.3 (commit eadd8c7).
This commit is contained in:
parent
3ac6576fe5
commit
a73e808b25
41 changed files with 464 additions and 264 deletions
2
third_party/lua/ltests.c
vendored
2
third_party/lua/ltests.c
vendored
|
@ -112,6 +112,7 @@ static void warnf (void *ud, const char *msg, int tocont) {
|
|||
strcat(buff, msg); /* add new message to current warning */
|
||||
if (!tocont) { /* message finished? */
|
||||
lua_unlock(L);
|
||||
luaL_checkstack(L, 1, "warn stack space");
|
||||
lua_getglobal(L, "_WARN");
|
||||
if (!lua_toboolean(L, -1))
|
||||
lua_pop(L, 1); /* ok, no previous unexpected warning */
|
||||
|
@ -133,6 +134,7 @@ static void warnf (void *ud, const char *msg, int tocont) {
|
|||
}
|
||||
case 2: { /* store */
|
||||
lua_unlock(L);
|
||||
luaL_checkstack(L, 1, "warn stack space");
|
||||
lua_pushstring(L, buff);
|
||||
lua_setglobal(L, "_WARN"); /* assign message to global '_WARN' */
|
||||
lua_lock(L);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue