Hi

Am 08.03.2018 um 15:10 schrieb Thierry Fournier:
> Ok, Lua expect the number of elements ins the stack. The right way for 
> returning 1 is:
> 
>    lua_pushinteger(L, 1);
>     return 1;
> 

Okay, then my patch probably worked, because of whatever value was left
on the stack. I learned something new here!

Indeed the original socket class pushes `1` to the stack (but it uses
lua_pushnumber, instead of pushinteger). For the reference here's the
original line of code:
https://github.com/diegonehab/luasocket/blob/316a9455b9cb4637fe6e62b20fbe05f5141fec54/src/timeout.c#L172

Best regards
Tim Düsterhus

Reply via email to