aboutsummaryrefslogtreecommitdiff
path: root/src/lj_carith.c
diff options
context:
space:
mode:
authorMike Pall <mike>2018-01-29 12:47:08 +0100
committerMike Pall <mike>2018-01-29 12:47:08 +0100
commitb03a56f28ec360bbcf43091afd0607890a4a33c7 (patch)
treee8ca6face0a82f440512ad01067c17390fdf5ae8 /src/lj_carith.c
parentc88602f080dcafea6ba222a2f7cc1ea0e41ef3cc (diff)
downloadluajit-b03a56f28ec360bbcf43091afd0607890a4a33c7.tar.gz
luajit-b03a56f28ec360bbcf43091afd0607890a4a33c7.tar.bz2
luajit-b03a56f28ec360bbcf43091afd0607890a4a33c7.zip
FFI: Don't assert on #1LL (5.2 compatibility mode only).
Reported by Denis Golovan.
Diffstat (limited to 'src/lj_carith.c')
-rw-r--r--src/lj_carith.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/lj_carith.c b/src/lj_carith.c
index 6224dee6..c34596ca 100644
--- a/src/lj_carith.c
+++ b/src/lj_carith.c
@@ -272,6 +272,15 @@ int lj_carith_op(lua_State *L, MMS mm)
272 return lj_carith_meta(L, cts, &ca, mm); 272 return lj_carith_meta(L, cts, &ca, mm);
273} 273}
274 274
275/* No built-in functionality for length of cdata. */
276int lj_carith_len(lua_State *L)
277{
278 CTState *cts = ctype_cts(L);
279 CDArith ca;
280 carith_checkarg(L, cts, &ca);
281 return lj_carith_meta(L, cts, &ca, MM_len);
282}
283
275/* -- 64 bit integer arithmetic helpers ----------------------------------- */ 284/* -- 64 bit integer arithmetic helpers ----------------------------------- */
276 285
277#if LJ_32 && LJ_HASJIT 286#if LJ_32 && LJ_HASJIT