aboutsummaryrefslogtreecommitdiff
path: root/src/lj_carith.c
diff options
context:
space:
mode:
authorMike Pall <mike>2018-01-29 12:53:42 +0100
committerMike Pall <mike>2018-01-29 12:53:42 +0100
commit74c544d68c07bcd416225598cdf15f88e62fd457 (patch)
treee180bc5a5b92a3eba053b9484ffb97c308da949a /src/lj_carith.c
parent8071aa4ad65cf09e3b7adda4a7787d8897e5314c (diff)
parentb03a56f28ec360bbcf43091afd0607890a4a33c7 (diff)
downloadluajit-74c544d68c07bcd416225598cdf15f88e62fd457.tar.gz
luajit-74c544d68c07bcd416225598cdf15f88e62fd457.tar.bz2
luajit-74c544d68c07bcd416225598cdf15f88e62fd457.zip
Merge branch 'master' into v2.1
Diffstat (limited to 'src/lj_carith.c')
-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