| 1720 | } |
| 1721 | |
| 1722 | static void RenderTypeChildren(lua_State *state, const std::vector<const compound_identity*> &children) |
| 1723 | { |
| 1724 | // fieldtable pairstable | |
| 1725 | int base = lua_gettop(state); |
| 1726 | |
| 1727 | for (size_t i = 0; i < children.size(); i++) |
| 1728 | { |
| 1729 | RenderType(state, children[i]); |
| 1730 | lua_pushstring(state, children[i]->getName()); |
| 1731 | lua_swap(state); |
| 1732 | |
| 1733 | // save in both tables |
| 1734 | lua_pushvalue(state, -2); |
| 1735 | lua_pushvalue(state, -2); |
| 1736 | lua_rawset(state, base); |
| 1737 | lua_rawset(state, base-1); |
| 1738 | } |
| 1739 | } |
| 1740 | |
| 1741 | static int DoAttach(lua_State *state) |
| 1742 | { |
no test coverage detected