summaryrefslogtreecommitdiff
path: root/lauxlib.c
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2012-03-18 13:52:49 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2012-03-18 13:52:49 -0300
commit29a28693e5018ad715723ea4ef38433559313b10 (patch)
tree7cfbf1114c336865d46c532d214e81df90df7ff9 /lauxlib.c
parent678c1255c92eed9c2c7564d340a5563b17395158 (diff)
downloadlua-github-29a28693e5018ad715723ea4ef38433559313b10.tar.gz
'luaL_checkversion' called by 'luaL_setfuncs'
Diffstat (limited to 'lauxlib.c')
-rw-r--r--lauxlib.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/lauxlib.c b/lauxlib.c
index 2a02b7c6..ad4d338f 100644
--- a/lauxlib.c
+++ b/lauxlib.c
@@ -1,5 +1,5 @@
/*
-** $Id: lauxlib.c,v 1.239 2011/12/02 13:25:57 roberto Exp roberto $
+** $Id: lauxlib.c,v 1.240 2011/12/06 16:33:55 roberto Exp roberto $
** Auxiliary functions for building Lua libraries
** See Copyright Notice in lua.h
*/
@@ -843,6 +843,7 @@ LUALIB_API void luaL_openlib (lua_State *L, const char *libname,
** Returns with only the table at the stack.
*/
LUALIB_API void luaL_setfuncs (lua_State *L, const luaL_Reg *l, int nup) {
+ luaL_checkversion(L);
luaL_checkstack(L, nup, "too many upvalues");
for (; l->name != NULL; l++) { /* fill the table with given functions */
int i;