lua

A copy of the Lua development repository
Log | Files | Refs | README

commit 69ea087dff1daba25a2000dfb8f1883c17545b7a
parent c05aaf3bf003d57eed54523c8d122897067238ed
Author: Roberto Ierusalimschy <roberto@inf.puc-rio.br>
Date:   Fri, 17 Feb 2006 13:50:40 -0200

small change to strip file names when stripping debug information

Diffstat:
Mldump.c | 4++--
Mlundump.c | 4++--
2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/ldump.c b/ldump.c @@ -1,5 +1,5 @@ /* -** $Id: ldump.c,v 1.13 2005/11/01 17:04:55 lhf Exp lhf $ +** $Id: ldump.c,v 1.15 2006/02/16 15:53:49 lhf Exp $ ** save precompiled Lua chunks ** See Copyright Notice in lua.h */ @@ -128,7 +128,7 @@ static void DumpDebug(const Proto* f, DumpState* D) static void DumpFunction(const Proto* f, const TString* p, DumpState* D) { - DumpString((f->source==p) ? NULL : f->source,D); + DumpString((f->source==p || D->strip) ? NULL : f->source,D); DumpInt(f->linedefined,D); DumpInt(f->lastlinedefined,D); DumpChar(f->nups,D); diff --git a/lundump.c b/lundump.c @@ -1,5 +1,5 @@ /* -** $Id: lundump.c,v 1.58 2005/09/02 01:54:47 lhf Exp lhf $ +** $Id: lundump.c,v 1.60 2006/02/16 15:53:49 lhf Exp $ ** load precompiled Lua chunks ** See Copyright Notice in lua.h */ @@ -201,7 +201,7 @@ Proto* luaU_undump (lua_State* L, ZIO* Z, Mbuffer* buff, const char* name) S.Z=Z; S.b=buff; LoadHeader(&S); - return LoadFunction(&S,NULL); + return LoadFunction(&S,luaS_newliteral(L,"=?")); } /*