diff options
Diffstat (limited to 'lapi.c')
| -rw-r--r-- | lapi.c | 12 |
1 files changed, 11 insertions, 1 deletions
| @@ -1,5 +1,5 @@ | |||
| 1 | /* | 1 | /* |
| 2 | ** $Id: lapi.c,v 2.67 2008/07/04 18:27:11 roberto Exp roberto $ | 2 | ** $Id: lapi.c,v 2.68 2008/08/01 17:01:16 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 | */ |
| @@ -121,6 +121,16 @@ LUA_API lua_CFunction lua_atpanic (lua_State *L, lua_CFunction panicf) { | |||
| 121 | } | 121 | } |
| 122 | 122 | ||
| 123 | 123 | ||
| 124 | LUA_API void lua_checkversion_ (lua_State *L, int version) { | ||
| 125 | lua_lock(L); | ||
| 126 | if (version != LUA_VERSION_NUM) | ||
| 127 | luaG_runerror(L, "application and Lua core using different Lua versions"); | ||
| 128 | if (G(L)->nilobjp != luaO_nilobject) | ||
| 129 | luaG_runerror(L, "application using two incompatible Lua VMs"); | ||
| 130 | lua_unlock(L); | ||
| 131 | } | ||
| 132 | |||
| 133 | |||
| 124 | 134 | ||
| 125 | /* | 135 | /* |
| 126 | ** basic stack manipulation | 136 | ** basic stack manipulation |
