aboutsummaryrefslogtreecommitdiff
path: root/src/lj_carith.c
diff options
context:
space:
mode:
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