Merge branch 'master' into v2.1

This commit is contained in:
Mike Pall
2020-05-08 14:00:07 +02:00
4 changed files with 6 additions and 14 deletions

View File

@@ -265,7 +265,7 @@ int lj_carith_op(lua_State *L, MMS mm)
{
CTState *cts = ctype_cts(L);
CDArith ca;
if (carith_checkarg(L, cts, &ca)) {
if (carith_checkarg(L, cts, &ca) && mm != MM_len && mm != MM_concat) {
if (carith_int64(L, cts, &ca, mm) || carith_ptr(L, cts, &ca, mm)) {
copyTV(L, &G(L)->tmptv2, L->top-1); /* Remember for trace recorder. */
return 1;
@@ -274,15 +274,6 @@ int lj_carith_op(lua_State *L, MMS mm)
return lj_carith_meta(L, cts, &ca, mm);
}
/* No built-in functionality for length of cdata. */
int lj_carith_len(lua_State *L)
{
CTState *cts = ctype_cts(L);
CDArith ca;
carith_checkarg(L, cts, &ca);
return lj_carith_meta(L, cts, &ca, MM_len);
}
/* -- 64 bit bit operations helpers --------------------------------------- */
#if LJ_64