aboutsummaryrefslogtreecommitdiff
path: root/lgc.c
diff options
context:
space:
mode:
Diffstat (limited to 'lgc.c')
-rw-r--r--lgc.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/lgc.c b/lgc.c
index a775b6e5..60f042c7 100644
--- a/lgc.c
+++ b/lgc.c
@@ -594,10 +594,10 @@ static void traversestrongtable (global_State *g, Table *h) {
594*/ 594*/
595static int getmode (global_State *g, Table *h) { 595static int getmode (global_State *g, Table *h) {
596 const TValue *mode = gfasttm(g, h->metatable, TM_MODE); 596 const TValue *mode = gfasttm(g, h->metatable, TM_MODE);
597 if (mode == NULL || !ttisshrstring(mode)) 597 if (mode == NULL || !ttisstring(mode))
598 return 0; /* ignore non-(short)string modes */ 598 return 0; /* ignore non-string modes */
599 else { 599 else {
600 const char *smode = getshrstr(tsvalue(mode)); 600 const char *smode = getstr(tsvalue(mode));
601 const char *weakkey = strchr(smode, 'k'); 601 const char *weakkey = strchr(smode, 'k');
602 const char *weakvalue = strchr(smode, 'v'); 602 const char *weakvalue = strchr(smode, 'v');
603 return ((weakkey != NULL) << 1) | (weakvalue != NULL); 603 return ((weakkey != NULL) << 1) | (weakvalue != NULL);