refactor(lua): cleanup and docs for threads

This commit is contained in:
bfredl
2022-02-26 11:03:39 +01:00
parent acf38245d8
commit 850b3e19c9
7 changed files with 79 additions and 78 deletions

View File

@@ -474,6 +474,9 @@ static int nlua_stricmp(lua_State *const lstate) FUNC_ATTR_NONNULL_ALL
void nlua_state_add_stdlib(lua_State *const lstate, bool is_thread)
{
if (!is_thread) {
// TODO(bfredl): some of basic string functions should already be
// (or be easy to make) threadsafe
// stricmp
lua_pushcfunction(lstate, &nlua_stricmp);
lua_setfield(lstate, -2, "stricmp");