Add support for __pairs and __ipairs metamethods (from Lua 5.2).

This commit is contained in:
Mike Pall
2010-11-18 00:23:24 +01:00
parent 3754a8fe7a
commit ba602c9578
9 changed files with 1748 additions and 1685 deletions

View File

@@ -417,7 +417,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)
_(metatable) _(tostring) _(pairs) _(ipairs)
typedef enum {
#define MMENUM(name) MM_##name,