lua-users home
lua-l archive

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

Op Di., 7 Aug. 2018 om 23:10 het Gé Weijers <> geskryf:
> Why not throw an error? (e.g. luaL_error(L, "libtls version too old, version = 0x%x", version);)
> A regular return will register the module in the module table, for every value possible it seems. The error handling will bypass that.

You don't want to bypass that.

The return value 'false' is an idiom that does not prevent 'require'
from trying to reload a module, but at the same time allows your
program to test whether there has been a previous unsuccessful