mirror of
https://github.com/lua/lua
synced 2026-09-29 04:35:58 +03:00
it's ok to dump functions with upvalues
This commit is contained in:
parent
03bab90303
commit
c51bcf4796
4 changed files with 19 additions and 6 deletions
4
lapi.c
4
lapi.c
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
** $Id: lapi.c,v 1.247 2003/10/10 13:29:08 roberto Exp roberto $
|
||||
** $Id: lapi.c,v 1.248 2003/10/20 12:25:23 roberto Exp roberto $
|
||||
** Lua API
|
||||
** See Copyright Notice in lua.h
|
||||
*/
|
||||
|
|
@ -784,7 +784,7 @@ LUA_API int lua_dump (lua_State *L, lua_Chunkwriter writer, void *data) {
|
|||
lua_lock(L);
|
||||
api_checknelems(L, 1);
|
||||
o = L->top - 1;
|
||||
if (isLfunction(o) && clvalue(o)->l.nupvalues == 0)
|
||||
if (isLfunction(o))
|
||||
status = luaU_dump(L, clvalue(o)->l.p, writer, data, 0);
|
||||
else
|
||||
status = 0;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue