aboutsummaryrefslogtreecommitdiff
path: root/src/lj_carith.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/lj_carith.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/lj_carith.c b/src/lj_carith.c
index 218abd26..1c050eba 100644
--- a/src/lj_carith.c
+++ b/src/lj_carith.c
@@ -274,6 +274,15 @@ int lj_carith_op(lua_State *L, MMS mm)
274 return lj_carith_meta(L, cts, &ca, mm); 274 return lj_carith_meta(L, cts, &ca, mm);
275} 275}
276 276
277/* No built-in functionality for length of cdata. */
278int lj_carith_len(lua_State *L)
279{
280 CTState *cts = ctype_cts(L);
281 CDArith ca;
282 carith_checkarg(L, cts, &ca);
283 return lj_carith_meta(L, cts, &ca, MM_len);
284}
285
277/* -- 64 bit bit operations helpers --------------------------------------- */ 286/* -- 64 bit bit operations helpers --------------------------------------- */
278 287
279#if LJ_64 288#if LJ_64
@@ -347,7 +356,6 @@ uint64_t lj_carith_check64(lua_State *L, int narg, CTypeID *id)
347 } 356 }
348} 357}
349 358
350
351/* -- 64 bit integer arithmetic helpers ----------------------------------- */ 359/* -- 64 bit integer arithmetic helpers ----------------------------------- */
352 360
353#if LJ_32 && LJ_HASJIT 361#if LJ_32 && LJ_HASJIT