diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2009-02-19 14:15:13 -0300 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2009-02-19 14:15:13 -0300 |
commit | 0cea28a7859a2a82740e9201102c5e29df787ac8 (patch) | |
tree | 0637aa06c903817b54051f3e3a8a595dc723bbf4 /lapi.c | |
parent | d2ebdc045bae7c8ed0e62729ca455444c076b1bb (diff) | |
download | lua-0cea28a7859a2a82740e9201102c5e29df787ac8.tar.gz lua-0cea28a7859a2a82740e9201102c5e29df787ac8.tar.bz2 lua-0cea28a7859a2a82740e9201102c5e29df787ac8.zip |
better error messages for 'lua_checkversion'
Diffstat (limited to 'lapi.c')
-rw-r--r-- | lapi.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: lapi.c,v 2.68 2008/08/01 17:01:16 roberto Exp roberto $ | 2 | ** $Id: lapi.c,v 2.69 2009/02/18 17:20:56 roberto Exp roberto $ |
3 | ** Lua API | 3 | ** Lua API |
4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
5 | */ | 5 | */ |
@@ -124,9 +124,9 @@ LUA_API lua_CFunction lua_atpanic (lua_State *L, lua_CFunction panicf) { | |||
124 | LUA_API void lua_checkversion_ (lua_State *L, int version) { | 124 | LUA_API void lua_checkversion_ (lua_State *L, int version) { |
125 | lua_lock(L); | 125 | lua_lock(L); |
126 | if (version != LUA_VERSION_NUM) | 126 | if (version != LUA_VERSION_NUM) |
127 | luaG_runerror(L, "application and Lua core using different Lua versions"); | 127 | luaG_runerror(L, "app./library not compiled with header " LUA_VERSION); |
128 | if (G(L)->nilobjp != luaO_nilobject) | 128 | if (G(L)->nilobjp != luaO_nilobject) |
129 | luaG_runerror(L, "application using two incompatible Lua VMs"); | 129 | luaG_runerror(L, "application using multiple Lua VMs"); |
130 | lua_unlock(L); | 130 | lua_unlock(L); |
131 | } | 131 | } |
132 | 132 | ||