MCPcopy Create free account
hub / github.com/EmmyLua/EmmyLuaDebugger / os_setlocale

Function os_setlocale

third-party/lua-5.5.0/src/loslib.c:384–393  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

382
383
384static int os_setlocale (lua_State *L) {
385 static const int cat[] = {LC_ALL, LC_COLLATE, LC_CTYPE, LC_MONETARY,
386 LC_NUMERIC, LC_TIME};
387 static const char *const catnames[] = {"all", "collate", "ctype", "monetary",
388 "numeric", "time", NULL};
389 const char *l = luaL_optstring(L, 1, NULL);
390 int op = luaL_checkoption(L, 2, "all", catnames);
391 lua_pushstring(L, setlocale(cat[op], l));
392 return 1;
393}
394
395
396static int os_exit (lua_State *L) {

Callers

nothing calls this directly

Calls 2

luaL_checkoptionFunction · 0.70
lua_pushstringFunction · 0.70

Tested by

no test coverage detected