Update Lua to 5.4.8#939
Merged
d0k3 merged 17 commits intod0k3:masterfrom Mar 25, 2026
Merged
Conversation
Contributor
|
Something in lcode.c was missed. (The other differences compared to 5.4.8 are indentation.) Just to be sure, I copied 5.4.8's source to the repo and manually applied the patches in 9905b93 - these are the differences diff --git a/arm9/source/lua/lcode.c b/arm9/source/lua/lcode.c
index 371ce59..3f78370 100644
--- a/arm9/source/lua/lcode.c
+++ b/arm9/source/lua/lcode.c
@@ -55,7 +55,7 @@ l_noret luaK_semerror (LexState *ls, const char *msg) {
** and returns 1. Otherwise, returns 0.
*/
static int tonumeral (const expdesc *e, TValue *v) {
- if (e->k == VJMP || hasjumps(e))
+ if (hasjumps(e))
return 0; /* not a numeral */
switch (e->k) {
case VKINT:
@@ -986,7 +986,7 @@ void luaK_exp2anyregup (FuncState *fs, expdesc *e) {
** or it is a constant.
*/
void luaK_exp2val (FuncState *fs, expdesc *e) {
- if (hasjumps(e))
+ if (e->k == VJMP || hasjumps(e))
luaK_exp2anyreg(fs, e);
else
luaK_dischargevars(fs, e);
diff --git a/arm9/source/lua/ldo.c b/arm9/source/lua/ldo.c
index 55acd80..c92573d 100644
--- a/arm9/source/lua/ldo.c
+++ b/arm9/source/lua/ldo.c
@@ -116,7 +116,7 @@ l_noret luaD_throw (lua_State *L, int errcode) {
else { /* thread has no error handler */
global_State *g = G(L);
errcode = luaE_resetthread(L, errcode); /* close all upvalues */
- L->status = errcode;
+ L->status = errcode;
if (g->mainthread->errorJmp) { /* main thread has a handler? */
setobjs2s(L, g->mainthread->top.p++, L->top.p - 1); /* copy error obj. */
luaD_throw(g->mainthread, errcode); /* re-throw in main thread */
diff --git a/arm9/source/lua/lvm.c b/arm9/source/lua/lvm.c
index 5091e2d..7023a04 100644
--- a/arm9/source/lua/lvm.c
+++ b/arm9/source/lua/lvm.c
@@ -339,10 +339,10 @@ void luaV_finishset (lua_State *L, const TValue *t, TValue *key,
lua_assert(isempty(slot)); /* slot must be empty */
tm = fasttm(L, h->metatable, TM_NEWINDEX); /* get metamethod */
if (tm == NULL) { /* no metamethod? */
- sethvalue2s(L, L->top.p, h); /* anchor 't' */
+ sethvalue2s(L, L->top.p, h); /* anchor 't' */
L->top.p++; /* assume EXTRA_STACK */
luaH_finishset(L, h, key, slot, val); /* set new value */
- L->top.p--;
+ L->top.p--;
invalidateTMcache(h);
luaC_barrierback(L, obj2gco(h), val);
return; |
Contributor
Author
|
Fixed, thanks! The indentation in those other files looks the same on my end though, and I'm not sure why. |
Contributor
|
Tabs vs spaces; GodMode9 expects spaces. |
Contributor
Author
|
Ah, thanks. should be fixed now. |
Contributor
|
Looks good to me now. One last thing is to update README.md in the lua folder to mention 5.4.8 and then it's ready. |
Owner
|
Thanks, both of you! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Bug fix update