aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMike Pall <mike>2023-10-21 13:13:34 +0200
committerMike Pall <mike>2023-10-21 13:13:34 +0200
commit7269b021302591a0088bd9109ebe4a59888494f0 (patch)
tree3e88a36eb5262eb71fcd8926119db84a2e09bcde /src
parent656ecbcf8f669feb94e0d0ec4b4f59190bcd2e48 (diff)
parentdb944b2b56c86fcf133745976763604d96110285 (diff)
downloadluajit-7269b021302591a0088bd9109ebe4a59888494f0.tar.gz
luajit-7269b021302591a0088bd9109ebe4a59888494f0.tar.bz2
luajit-7269b021302591a0088bd9109ebe4a59888494f0.zip
Merge branch 'master' into v2.1
Diffstat (limited to 'src')
-rw-r--r--src/lj_carith.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/lj_carith.c b/src/lj_carith.c
index df5f801e..9bea0a33 100644
--- a/src/lj_carith.c
+++ b/src/lj_carith.c
@@ -44,9 +44,13 @@ static int carith_checkarg(lua_State *L, CTState *cts, CDArith *ca)
44 p = (uint8_t *)cdata_getptr(p, ct->size); 44 p = (uint8_t *)cdata_getptr(p, ct->size);
45 if (ctype_isref(ct->info)) ct = ctype_rawchild(cts, ct); 45 if (ctype_isref(ct->info)) ct = ctype_rawchild(cts, ct);
46 } else if (ctype_isfunc(ct->info)) { 46 } else if (ctype_isfunc(ct->info)) {
47 CTypeID id0 = i ? ctype_typeid(cts, ca->ct[0]) : 0;
47 p = (uint8_t *)*(void **)p; 48 p = (uint8_t *)*(void **)p;
48 ct = ctype_get(cts, 49 ct = ctype_get(cts,
49 lj_ctype_intern(cts, CTINFO(CT_PTR, CTALIGN_PTR|id), CTSIZE_PTR)); 50 lj_ctype_intern(cts, CTINFO(CT_PTR, CTALIGN_PTR|id), CTSIZE_PTR));
51 if (i) { /* cts->tab may have been reallocated. */
52 ca->ct[0] = ctype_get(cts, id0);
53 }
50 } 54 }
51 if (ctype_isenum(ct->info)) ct = ctype_child(cts, ct); 55 if (ctype_isenum(ct->info)) ct = ctype_child(cts, ct);
52 ca->ct[i] = ct; 56 ca->ct[i] = ct;