lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


> So the logic looks like:
> if(lua_isstring(L, 1)) /* we have a path */
> else if(lua_isnumber(L, 1)) /* we have an FD */

This is a typical cases where you need to switch on lua_type(L,1).
The logic will be clearer and correct.