FFI: Don't assert on #1LL (5.2 compatibility mode only).

Reported by Denis Golovan.
This commit is contained in:
Mike Pall
2018-01-29 12:47:08 +01:00
parent c88602f080
commit b03a56f28e
3 changed files with 11 additions and 1 deletions

View File

@@ -272,6 +272,15 @@ 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 integer arithmetic helpers ----------------------------------- */
#if LJ_32 && LJ_HASJIT