diff options
| author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2012-03-18 13:52:49 -0300 |
|---|---|---|
| committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2012-03-18 13:52:49 -0300 |
| commit | 29a28693e5018ad715723ea4ef38433559313b10 (patch) | |
| tree | 7cfbf1114c336865d46c532d214e81df90df7ff9 | |
| parent | 678c1255c92eed9c2c7564d340a5563b17395158 (diff) | |
| download | lua-29a28693e5018ad715723ea4ef38433559313b10.tar.gz lua-29a28693e5018ad715723ea4ef38433559313b10.tar.bz2 lua-29a28693e5018ad715723ea4ef38433559313b10.zip | |
'luaL_checkversion' called by 'luaL_setfuncs'
| -rw-r--r-- | lauxlib.c | 3 |
1 files changed, 2 insertions, 1 deletions
| @@ -1,5 +1,5 @@ | |||
| 1 | /* | 1 | /* |
| 2 | ** $Id: lauxlib.c,v 1.239 2011/12/02 13:25:57 roberto Exp roberto $ | 2 | ** $Id: lauxlib.c,v 1.240 2011/12/06 16:33:55 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 | */ |
| @@ -843,6 +843,7 @@ LUALIB_API void luaL_openlib (lua_State *L, const char *libname, | |||
| 843 | ** Returns with only the table at the stack. | 843 | ** Returns with only the table at the stack. |
| 844 | */ | 844 | */ |
| 845 | LUALIB_API void luaL_setfuncs (lua_State *L, const luaL_Reg *l, int nup) { | 845 | LUALIB_API void luaL_setfuncs (lua_State *L, const luaL_Reg *l, int nup) { |
| 846 | luaL_checkversion(L); | ||
| 846 | luaL_checkstack(L, nup, "too many upvalues"); | 847 | luaL_checkstack(L, nup, "too many upvalues"); |
| 847 | for (; l->name != NULL; l++) { /* fill the table with given functions */ | 848 | for (; l->name != NULL; l++) { /* fill the table with given functions */ |
| 848 | int i; | 849 | int i; |
