mirror of
https://github.com/lua/lua.git
synced 2025-01-14 05:43:00 +08:00
'luaL_checkversion' called by 'luaL_setfuncs'
This commit is contained in:
parent
678c1255c9
commit
29a28693e5
@ -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
|
** Auxiliary functions for building Lua libraries
|
||||||
** See Copyright Notice in lua.h
|
** 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.
|
** Returns with only the table at the stack.
|
||||||
*/
|
*/
|
||||||
LUALIB_API void luaL_setfuncs (lua_State *L, const luaL_Reg *l, int nup) {
|
LUALIB_API void luaL_setfuncs (lua_State *L, const luaL_Reg *l, int nup) {
|
||||||
|
luaL_checkversion(L);
|
||||||
luaL_checkstack(L, nup, "too many upvalues");
|
luaL_checkstack(L, nup, "too many upvalues");
|
||||||
for (; l->name != NULL; l++) { /* fill the table with given functions */
|
for (; l->name != NULL; l++) { /* fill the table with given functions */
|
||||||
int i;
|
int i;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user