aboutsummaryrefslogtreecommitdiff
path: root/src/lj_obj.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/lj_obj.h')
-rw-r--r--src/lj_obj.h10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/lj_obj.h b/src/lj_obj.h
index 7890e54b..67fb5ed9 100644
--- a/src/lj_obj.h
+++ b/src/lj_obj.h
@@ -447,10 +447,12 @@ enum {
447#define MMDEF_FFI(_) 447#define MMDEF_FFI(_)
448#endif 448#endif
449 449
450#ifdef LUAJIT_ENABLE_LUA52COMPAT 450#if defined(LUAJIT_ENABLE_LUA52COMPAT) || LJ_HASFFI
451#define MMDEF_52(_) _(pairs) _(ipairs) 451#define MMDEF_PAIRS(_) _(pairs) _(ipairs)
452#else 452#else
453#define MMDEF_52(_) 453#define MMDEF_PAIRS(_)
454#define MM_pairs 255
455#define MM_ipairs 255
454#endif 456#endif
455 457
456#define MMDEF(_) \ 458#define MMDEF(_) \
@@ -460,7 +462,7 @@ enum {
460 /* The following must be in ORDER ARITH. */ \ 462 /* The following must be in ORDER ARITH. */ \
461 _(add) _(sub) _(mul) _(div) _(mod) _(pow) _(unm) \ 463 _(add) _(sub) _(mul) _(div) _(mod) _(pow) _(unm) \
462 /* The following are used in the standard libraries. */ \ 464 /* The following are used in the standard libraries. */ \
463 _(metatable) _(tostring) MMDEF_FFI(_) MMDEF_52(_) 465 _(metatable) _(tostring) MMDEF_FFI(_) MMDEF_PAIRS(_)
464 466
465typedef enum { 467typedef enum {
466#define MMENUM(name) MM_##name, 468#define MMENUM(name) MM_##name,