diff options
author | Mike Pall <mike> | 2020-05-08 14:00:07 +0200 |
---|---|---|
committer | Mike Pall <mike> | 2020-05-08 14:00:07 +0200 |
commit | d5e12d5174720fbd3c5fad4e02da5850b8433057 (patch) | |
tree | e6f53754f6086ed254cf2a8d0fcfbeee679696f1 /src/lj_carith.c | |
parent | 92c011b5117f237f2554c5745646ea566ce0d568 (diff) | |
parent | cc4bbec483d3f3250b519ccb7cc22f1a8e6fe6f0 (diff) | |
download | luajit-d5e12d5174720fbd3c5fad4e02da5850b8433057.tar.gz luajit-d5e12d5174720fbd3c5fad4e02da5850b8433057.tar.bz2 luajit-d5e12d5174720fbd3c5fad4e02da5850b8433057.zip |
Merge branch 'master' into v2.1
Diffstat (limited to 'src/lj_carith.c')
-rw-r--r-- | src/lj_carith.c | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/src/lj_carith.c b/src/lj_carith.c index cb7e8db6..cf71aaf5 100644 --- a/src/lj_carith.c +++ b/src/lj_carith.c | |||
@@ -265,7 +265,7 @@ int lj_carith_op(lua_State *L, MMS mm) | |||
265 | { | 265 | { |
266 | CTState *cts = ctype_cts(L); | 266 | CTState *cts = ctype_cts(L); |
267 | CDArith ca; | 267 | CDArith ca; |
268 | if (carith_checkarg(L, cts, &ca)) { | 268 | if (carith_checkarg(L, cts, &ca) && mm != MM_len && mm != MM_concat) { |
269 | if (carith_int64(L, cts, &ca, mm) || carith_ptr(L, cts, &ca, mm)) { | 269 | if (carith_int64(L, cts, &ca, mm) || carith_ptr(L, cts, &ca, mm)) { |
270 | copyTV(L, &G(L)->tmptv2, L->top-1); /* Remember for trace recorder. */ | 270 | copyTV(L, &G(L)->tmptv2, L->top-1); /* Remember for trace recorder. */ |
271 | return 1; | 271 | return 1; |
@@ -274,15 +274,6 @@ 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. */ | ||
278 | int 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 | |||
286 | /* -- 64 bit bit operations helpers --------------------------------------- */ | 277 | /* -- 64 bit bit operations helpers --------------------------------------- */ |
287 | 278 | ||
288 | #if LJ_64 | 279 | #if LJ_64 |