External strings are as good as internal ones

A '__mode' metafield and an "n" key both can be external strings.
This commit is contained in:
Roberto I
2025-11-11 14:40:30 -03:00
parent 81f4def54f
commit 5b7d998764
4 changed files with 28 additions and 6 deletions

2
ltm.c
View File

@@ -287,7 +287,7 @@ void luaT_getvararg (CallInfo *ci, StkId ra, TValue *rc) {
return;
}
}
else if (ttisshrstring(rc)) { /* short-string value? */
else if (ttisstring(rc)) { /* string value? */
size_t len;
const char *s = getlstr(tsvalue(rc), len);
if (len == 1 && s[0] == 'n') { /* key is "n"? */