| 192 | #include "lj_libdef.h" |
| 193 | |
| 194 | LUALIB_API int luaopen_math(lua_State *L) |
| 195 | { |
| 196 | PRNGState *rs = (PRNGState *)lua_newuserdata(L, sizeof(PRNGState)); |
| 197 | lj_prng_seed_fixed(rs); |
| 198 | LJ_LIB_REG(L, LUA_MATHLIBNAME, math); |
| 199 | #if defined(LUA_COMPAT_MOD) && !LJ_52 |
| 200 | lua_getfield(L, -1, "fmod"); |
| 201 | lua_setfield(L, -2, "mod"); |
| 202 | #endif |
| 203 | return 1; |
| 204 | } |
| 205 |
nothing calls this directly
no test coverage detected