| 91 | |
| 92 | /* push a new selection into lua stack, return the selectionvar */ |
| 93 | staticfn struct selectionvar * |
| 94 | l_selection_push_new(lua_State *L) |
| 95 | { |
| 96 | struct selectionvar *tmp = selection_new(); |
| 97 | struct selectionvar *sel |
| 98 | = (struct selectionvar *) lua_newuserdata(L, sizeof (struct selectionvar)); |
| 99 | |
| 100 | luaL_getmetatable(L, "selection"); |
| 101 | lua_setmetatable(L, -2); |
| 102 | |
| 103 | *sel = *tmp; |
| 104 | sel->map = dupstr(tmp->map); |
| 105 | selection_free(tmp, TRUE); |
| 106 | |
| 107 | return sel; |
| 108 | } |
| 109 | |
| 110 | /* push a copy of selectionvar tmp to lua stack */ |
| 111 | void |
no test coverage detected