Home | History | Annotate | Download | only in src

Lines Matching refs:nup

914                                const luaL_Reg *l, int nup) {
918 lua_insert(L, -(nup + 1)); /* move library table to below upvalues */
921 luaL_setfuncs(L, l, nup);
923 lua_pop(L, nup); /* remove upvalues */
930 ** set functions from list 'l' into table at top - 'nup'; each
931 ** function gets the 'nup' elements at the top as upvalues.
934 LUALIB_API void luaL_setfuncs (lua_State *L, const luaL_Reg *l, int nup) {
935 luaL_checkstack(L, nup, "too many upvalues");
938 for (i = 0; i < nup; i++) /* copy upvalues to the top */
939 lua_pushvalue(L, -nup);
940 lua_pushcclosure(L, l->func, nup); /* closure with those upvalues */
941 lua_setfield(L, -(nup + 2), l->name);
943 lua_pop(L, nup); /* remove upvalues */