mirror of
https://github.com/lua/lua
synced 2026-09-26 16:17:11 +03:00
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:
parent
81f4def54f
commit
5b7d998764
4 changed files with 28 additions and 6 deletions
2
ltm.c
2
ltm.c
|
|
@ -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"? */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue