diff options
Diffstat (limited to '')
-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 |