mirror of https://github.com/rusefi/lua.git
added 'stip' parameter to lua_dump/string.dump
This commit is contained in:
parent
6318de80d3
commit
295f7ac04e
8
lapi.c
8
lapi.c
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
** $Id: lapi.c,v 2.197 2014/02/15 13:12:01 roberto Exp roberto $
|
** $Id: lapi.c,v 2.198 2014/02/19 13:51:09 roberto Exp roberto $
|
||||||
** Lua API
|
** Lua API
|
||||||
** See Copyright Notice in lua.h
|
** See Copyright Notice in lua.h
|
||||||
*/
|
*/
|
||||||
|
@ -1009,14 +1009,14 @@ LUA_API int lua_load (lua_State *L, lua_Reader reader, void *data,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
LUA_API int lua_dump (lua_State *L, lua_Writer writer, void *data) {
|
LUA_API int lua_dump (lua_State *L, lua_Writer writer, void *data, int strip) {
|
||||||
int status;
|
int status;
|
||||||
TValue *o;
|
TValue *o;
|
||||||
lua_lock(L);
|
lua_lock(L);
|
||||||
api_checknelems(L, 1);
|
api_checknelems(L, 1);
|
||||||
o = L->top - 1;
|
o = L->top - 1;
|
||||||
if (isLfunction(o))
|
if (isLfunction(o))
|
||||||
status = luaU_dump(L, getproto(o), writer, data, 0);
|
status = luaU_dump(L, getproto(o), writer, data, strip);
|
||||||
else
|
else
|
||||||
status = 1;
|
status = 1;
|
||||||
lua_unlock(L);
|
lua_unlock(L);
|
||||||
|
@ -1208,7 +1208,7 @@ static const char *aux_upvalue (StkId fi, int n, TValue **val,
|
||||||
*val = f->upvals[n-1]->v;
|
*val = f->upvals[n-1]->v;
|
||||||
if (uv) *uv = f->upvals[n - 1];
|
if (uv) *uv = f->upvals[n - 1];
|
||||||
name = p->upvalues[n-1].name;
|
name = p->upvalues[n-1].name;
|
||||||
return (name == NULL) ? "" : getstr(name);
|
return (name == NULL) ? "(*no name)" : getstr(name);
|
||||||
}
|
}
|
||||||
default: return NULL; /* not a closure */
|
default: return NULL; /* not a closure */
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue