diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2014-04-15 15:25:49 -0300 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2014-04-15 15:25:49 -0300 |
commit | 4422b9747253a065da560e6d24388c9fd98c6223 (patch) | |
tree | 328952ac998f747d1fe137bab8eb42f670abb910 /lauxlib.c | |
parent | 2f02d264e987c74c1619a1d9f70efc87b2369886 (diff) | |
download | lua-4422b9747253a065da560e6d24388c9fd98c6223.tar.gz lua-4422b9747253a065da560e6d24388c9fd98c6223.tar.bz2 lua-4422b9747253a065da560e6d24388c9fd98c6223.zip |
keep 'luaL_checkversion_' with its signature in version 5.2, for
correct error messages in case of version mixings
Diffstat (limited to 'lauxlib.c')
-rw-r--r-- | lauxlib.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: lauxlib.c,v 1.260 2014/03/12 20:57:40 roberto Exp roberto $ | 2 | ** $Id: lauxlib.c,v 1.261 2014/04/01 18:55:06 roberto Exp roberto $ |
3 | ** Auxiliary functions for building Lua libraries | 3 | ** Auxiliary functions for building Lua libraries |
4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
5 | */ | 5 | */ |
@@ -966,12 +966,12 @@ LUALIB_API lua_State *luaL_newstate (void) { | |||
966 | } | 966 | } |
967 | 967 | ||
968 | 968 | ||
969 | LUALIB_API void luaL_checkversion_ (lua_State *L, int ver, size_t sz) { | 969 | LUALIB_API void luaL_checkversion_ (lua_State *L, lua_Number ver, size_t sz) { |
970 | const lua_Number *v = lua_version(L); | 970 | const lua_Number *v = lua_version(L); |
971 | if (v != lua_version(NULL)) | 971 | if (v != lua_version(NULL)) |
972 | luaL_error(L, "multiple Lua VMs detected"); | 972 | luaL_error(L, "multiple Lua VMs detected"); |
973 | else if (*v != ver) | 973 | else if (*v != ver) |
974 | luaL_error(L, "version mismatch: app. needs %d, Lua core provides %f", | 974 | luaL_error(L, "version mismatch: app. needs %f, Lua core provides %f", |
975 | ver, *v); | 975 | ver, *v); |
976 | /* check numeric types */ | 976 | /* check numeric types */ |
977 | if (sz != LUAL_NUMSIZES) | 977 | if (sz != LUAL_NUMSIZES) |