push a copy of selectionvar tmp to lua stack */
| 109 | |
| 110 | /* push a copy of selectionvar tmp to lua stack */ |
| 111 | void |
| 112 | l_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(); */ |
no test coverage detected