summaryrefslogtreecommitdiffstats
path: root/apps/plugins/lua/ldump.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/plugins/lua/ldump.c')
-rw-r--r--apps/plugins/lua/ldump.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/apps/plugins/lua/ldump.c b/apps/plugins/lua/ldump.c
index 9afba60a37..be7dce3497 100644
--- a/apps/plugins/lua/ldump.c
+++ b/apps/plugins/lua/ldump.c
@@ -113,8 +113,17 @@ static void DumpConstants(const Proto* f, DumpState* D)
static void DumpDebug(const Proto* f, DumpState* D)
{
int i,n;
+#ifdef LUA_OPTIMIZE_DEBUG
+ n = (D->strip || f->packedlineinfo == NULL) ? 0: f->sizelineinfo;
+ DumpInt(n,D);
+ if (n)
+ {
+ DumpBlock(f->packedlineinfo, n, D);
+ }
+#else
n= (D->strip) ? 0 : f->sizelineinfo;
DumpVector(f->lineinfo,n,sizeof(int),D);
+#endif
n= (D->strip) ? 0 : f->sizelocvars;
DumpInt(n,D);
for (i=0; i<n; i++)