diff options
Diffstat (limited to '')
| -rw-r--r-- | ltests.c | 16 |
1 files changed, 8 insertions, 8 deletions
| @@ -344,14 +344,14 @@ static int unref (lua_State *L) { | |||
| 344 | return 0; | 344 | return 0; |
| 345 | } | 345 | } |
| 346 | 346 | ||
| 347 | static int eventtable (lua_State *L) { | 347 | static int metatable (lua_State *L) { |
| 348 | luaL_check_any(L, 1); | 348 | luaL_check_any(L, 1); |
| 349 | if (lua_isnone(L, 2)) | 349 | if (lua_isnone(L, 2)) |
| 350 | lua_geteventtable(L, 1); | 350 | lua_getmetatable(L, 1); |
| 351 | else { | 351 | else { |
| 352 | lua_settop(L, 2); | 352 | lua_settop(L, 2); |
| 353 | luaL_check_type(L, 2, LUA_TTABLE); | 353 | luaL_check_type(L, 2, LUA_TTABLE); |
| 354 | lua_seteventtable(L, 1); | 354 | lua_setmetatable(L, 1); |
| 355 | } | 355 | } |
| 356 | return 1; | 356 | return 1; |
| 357 | } | 357 | } |
| @@ -608,11 +608,11 @@ static int testC (lua_State *L) { | |||
| 608 | else if EQ("dostring") { | 608 | else if EQ("dostring") { |
| 609 | lua_dostring(L, luaL_check_string(L, getnum)); | 609 | lua_dostring(L, luaL_check_string(L, getnum)); |
| 610 | } | 610 | } |
| 611 | else if EQ("seteventtable") { | 611 | else if EQ("setmetatable") { |
| 612 | lua_seteventtable(L, getnum); | 612 | lua_setmetatable(L, getnum); |
| 613 | } | 613 | } |
| 614 | else if EQ("geteventtable") { | 614 | else if EQ("getmetatable") { |
| 615 | lua_geteventtable(L, getnum); | 615 | lua_getmetatable(L, getnum); |
| 616 | } | 616 | } |
| 617 | else if EQ("type") { | 617 | else if EQ("type") { |
| 618 | lua_pushstring(L, lua_typename(L, lua_type(L, getnum))); | 618 | lua_pushstring(L, lua_typename(L, lua_type(L, getnum))); |
| @@ -642,7 +642,7 @@ static const struct luaL_reg tests_funcs[] = { | |||
| 642 | {"unref", unref}, | 642 | {"unref", unref}, |
| 643 | {"d2s", d2s}, | 643 | {"d2s", d2s}, |
| 644 | {"s2d", s2d}, | 644 | {"s2d", s2d}, |
| 645 | {"eventtable", eventtable}, | 645 | {"metatable", metatable}, |
| 646 | {"newuserdata", newuserdata}, | 646 | {"newuserdata", newuserdata}, |
| 647 | {"newuserdatabox", newuserdatabox}, | 647 | {"newuserdatabox", newuserdatabox}, |
| 648 | {"udataval", udataval}, | 648 | {"udataval", udataval}, |
