Avoid name clash with Windows MM_MAX define.

This commit is contained in:
Mike Pall 2011-05-08 22:31:03 +02:00
parent 16369d5a64
commit 87553d9e77
2 changed files with 4 additions and 4 deletions

View File

@ -204,7 +204,7 @@ static const char *getfuncname(lua_State *L, TValue *frame, const char **name)
BCReg slot = bc_a(*ip);
if (bc_op(*ip) == BC_ITERC) slot -= 3;
return getobjname(funcproto(fn), ip, slot, name);
} else if (mm != MM_MAX) {
} else if (mm != MM__MAX) {
*name = strdata(mmname_str(G(L), mm));
return "metamethod";
} else {

View File

@ -459,15 +459,15 @@ typedef enum {
#define MMENUM(name) MM_##name,
MMDEF(MMENUM)
#undef MMENUM
MM_MAX,
MM____ = MM_MAX,
MM__MAX,
MM____ = MM__MAX,
MM_FAST = MM_eq
} MMS;
/* GC root IDs. */
typedef enum {
GCROOT_MMNAME, /* Metamethod names. */
GCROOT_MMNAME_LAST = GCROOT_MMNAME + MM_MAX-1,
GCROOT_MMNAME_LAST = GCROOT_MMNAME + MM__MAX-1,
GCROOT_BASEMT, /* Metatables for base types. */
GCROOT_BASEMT_NUM = GCROOT_BASEMT + ~LJ_TNUMX,
GCROOT_IO_INPUT, /* Userdata for default I/O input file. */