MCPcopy Create free account
hub / github.com/NetHack/NetHack / l_selection_push_copy

Function l_selection_push_copy

src/nhlsel.c:111–122  ·  view source on GitHub ↗

push a copy of selectionvar tmp to lua stack */

Source from the content-addressed store, hash-verified

109
110/* push a copy of selectionvar tmp to lua stack */
111void
112l_selection_push_copy(lua_State *L, struct selectionvar *tmp)
113{
114 struct selectionvar *sel
115 = (struct selectionvar *) lua_newuserdata(L, sizeof (struct selectionvar));
116
117 luaL_getmetatable(L, "selection");
118 lua_setmetatable(L, -2);
119
120 *sel = *tmp;
121 sel->map = dupstr(tmp->map);
122}
123
124
125/* local sel = selection.new(); */

Callers 4

l_selection_roomFunction · 0.85
lspo_mapFunction · 0.85

Calls 1

dupstrFunction · 0.85

Tested by

no test coverage detected