MCPcopy Create free account
hub / github.com/DFHack/dfhack / luaL_checkversion_

Function luaL_checkversion_

depends/lua/src/lauxlib.c:1038–1047  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1036
1037
1038LUALIB_API void luaL_checkversion_ (lua_State *L, lua_Number ver, size_t sz) {
1039 const lua_Number *v = lua_version(L);
1040 if (sz != LUAL_NUMSIZES) /* check numeric types */
1041 luaL_error(L, "core and library have incompatible numeric types");
1042 if (v != lua_version(NULL))
1043 luaL_error(L, "multiple Lua VMs detected");
1044 else if (*v != ver)
1045 luaL_error(L, "version mismatch: app. needs %f, Lua core provides %f",
1046 (LUAI_UACNUMBER)ver, (LUAI_UACNUMBER)*v);
1047}
1048

Callers

nothing calls this directly

Calls 2

lua_versionFunction · 0.85
luaL_errorFunction · 0.85

Tested by

no test coverage detected