MCPcopy Create free account
hub / github.com/PlutoLang/Pluto / luaopen_table

Function luaopen_table

src/ltablib.cpp:1116–1132  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1114
1115
1116LUAMOD_API int luaopen_table (lua_State *L) {
1117 luaL_newlib(L, tab_funcs);
1118
1119#ifndef PLUTO_DONT_LOAD_ANY_STANDARD_LIBRARY_CODE_WRITTEN_IN_PLUTO
1120 lua_pushliteral(L, "min");
1121 luaL_loadstring(L, "return |t| -> table.reduce(t, math.min, math.maxinteger)");
1122 lua_call(L, 0, 1);
1123 lua_settable(L, -3);
1124
1125 lua_pushliteral(L, "max");
1126 luaL_loadstring(L, "return |t| -> table.reduce(t, math.max, math.mininteger)");
1127 lua_call(L, 0, 1);
1128 lua_settable(L, -3);
1129#endif
1130
1131 return 1;
1132}
1133

Callers

nothing calls this directly

Calls 2

luaL_loadstringFunction · 0.85
lua_settableFunction · 0.85

Tested by

no test coverage detected