| 1114 | |
| 1115 | |
| 1116 | LUAMOD_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 |
nothing calls this directly
no test coverage detected