Comparison

util-src/poll.c @ 9506:ae6636052be9

net.server_epoll: Graceful handling of registering already added socket
author Kim Alvefur <zash@zash.se>
date Fri, 12 Oct 2018 03:20:09 +0200
parent 9478:bd178ed0459b
child 9507:33d21f020b66
comparison
equal deleted inserted replaced
9505:5203b6fd34d4 9506:ae6636052be9
450 lua_pushcfunction(L, Lgc); 450 lua_pushcfunction(L, Lgc);
451 lua_setfield(L, -2, "__gc"); 451 lua_setfield(L, -2, "__gc");
452 #endif 452 #endif
453 } 453 }
454 454
455 lua_createtable(L, 0, 1); 455 lua_createtable(L, 0, 2);
456 { 456 {
457 lua_pushcfunction(L, Lnew); 457 lua_pushcfunction(L, Lnew);
458 lua_setfield(L, -2, "new"); 458 lua_setfield(L, -2, "new");
459 } 459
460 return 1; 460 #define push_errno(named_error) lua_pushinteger(L, named_error);\
461 } 461 lua_setfield(L, -2, #named_error);
462 462
463 push_errno(EEXIST);
464
465 }
466 return 1;
467 }
468