| 1639 | } |
| 1640 | |
| 1641 | static void AddContainerMethodFun(lua_State *state, int meta_idx, int field_idx, |
| 1642 | lua_CFunction function, const char *name, |
| 1643 | const type_identity *container, const type_identity *item, int count) |
| 1644 | { |
| 1645 | lua_pushfstring(state, "%s()", name); |
| 1646 | SetContainerMethod(state, meta_idx, lua_gettop(state), function, name, container, item, count); |
| 1647 | lua_pop(state, 1); |
| 1648 | |
| 1649 | EnableMetaField(state, field_idx, name); |
| 1650 | } |
| 1651 | |
| 1652 | /** |
| 1653 | * Make a container-style object metatable. |
no test coverage detected