MCPcopy Create free account
hub / github.com/Tencent/UnLua / return_fd

Function return_fd

Plugins/UnLuaExtensions/LuaSocket/Source/src/select.cpp:183–194  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

181}
182
183static void return_fd(lua_State *L, fd_set *set, t_socket max_fd,
184 int itab, int tab, int start) {
185 t_socket fd;
186 for (fd = 0; fd < max_fd; fd++) {
187 if (FD_ISSET(fd, set)) {
188 lua_pushnumber(L, ++start);
189 lua_pushnumber(L, (lua_Number) fd);
190 lua_gettable(L, itab);
191 lua_settable(L, tab);
192 }
193 }
194}
195
196static void make_assoc(lua_State *L, int tab) {
197 int i = 1, atab;

Callers 1

global_selectFunction · 0.85

Calls 3

lua_pushnumberFunction · 0.85
lua_gettableFunction · 0.85
lua_settableFunction · 0.85

Tested by

no test coverage detected