Disable Lua 5.2 features by default. See -DLUAJIT_ENABLE_LUA52COMPAT.

This commit is contained in:
Mike Pall
2010-11-19 17:00:11 +01:00
parent ba602c9578
commit 57cd5026eb
10 changed files with 2973 additions and 2901 deletions

View File

@@ -410,6 +410,12 @@ enum {
#define setvmstate(g, st) ((g)->vmstate = ~LJ_VMST_##st)
/* Metamethods. */
#ifdef LUAJIT_ENABLE_LUA52COMPAT
#define MMDEF_52(_) _(pairs) _(ipairs)
#else
#define MMDEF_52(_)
#endif
#define MMDEF(_) \
_(index) _(newindex) _(gc) _(mode) _(eq) \
/* Only the above (fast) metamethods are negative cached (max. 8). */ \
@@ -417,7 +423,7 @@ enum {
/* The following must be in ORDER ARITH. */ \
_(add) _(sub) _(mul) _(div) _(mod) _(pow) _(unm) \
/* The following are used in the standard libraries. */ \
_(metatable) _(tostring) _(pairs) _(ipairs)
_(metatable) _(tostring) MMDEF_52(_)
typedef enum {
#define MMENUM(name) MM_##name,