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.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/lj_obj.h b/src/lj_obj.h
index ea5c69c5..cbb25675 100644
--- a/src/lj_obj.h
+++ b/src/lj_obj.h
@@ -410,6 +410,12 @@ enum {
410#define setvmstate(g, st) ((g)->vmstate = ~LJ_VMST_##st) 410#define setvmstate(g, st) ((g)->vmstate = ~LJ_VMST_##st)
411 411
412/* Metamethods. */ 412/* Metamethods. */
413#ifdef LUAJIT_ENABLE_LUA52COMPAT
414#define MMDEF_52(_) _(pairs) _(ipairs)
415#else
416#define MMDEF_52(_)
417#endif
418
413#define MMDEF(_) \ 419#define MMDEF(_) \
414 _(index) _(newindex) _(gc) _(mode) _(eq) \ 420 _(index) _(newindex) _(gc) _(mode) _(eq) \
415 /* Only the above (fast) metamethods are negative cached (max. 8). */ \ 421 /* Only the above (fast) metamethods are negative cached (max. 8). */ \
@@ -417,7 +423,7 @@ enum {
417 /* The following must be in ORDER ARITH. */ \ 423 /* The following must be in ORDER ARITH. */ \
418 _(add) _(sub) _(mul) _(div) _(mod) _(pow) _(unm) \ 424 _(add) _(sub) _(mul) _(div) _(mod) _(pow) _(unm) \
419 /* The following are used in the standard libraries. */ \ 425 /* The following are used in the standard libraries. */ \
420 _(metatable) _(tostring) _(pairs) _(ipairs) 426 _(metatable) _(tostring) MMDEF_52(_)
421 427
422typedef enum { 428typedef enum {
423#define MMENUM(name) MM_##name, 429#define MMENUM(name) MM_##name,