lua

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

commit 04da0a40c0a541c32140ac952823a9d768cfaf8d
parent eb678282368c8b31289e999da777a4d79abcfdfe
Author: Roberto Ierusalimschy <roberto@inf.puc-rio.br>
Date:   Wed, 18 Jun 2014 10:54:06 -0300

added assertion about sources being the same for all protos in a chunk

Diffstat:
Mldump.c | 6++++--
1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/ldump.c b/ldump.c @@ -1,5 +1,5 @@ /* -** $Id: ldump.c,v 2.29 2014/04/01 14:39:55 roberto Exp roberto $ +** $Id: ldump.c,v 2.30 2014/06/18 13:21:12 roberto Exp roberto $ ** save precompiled Lua chunks ** See Copyright Notice in lua.h */ @@ -120,8 +120,10 @@ static void DumpConstants (const Proto *f, DumpState *D) { } n = f->sizep; DumpInt(n, D); - for (i = 0; i < n; i++) + for (i = 0; i < n; i++) { + lua_assert(f->source == f->p[i]->source); /* same source for all protos */ DumpFunction(f->p[i], D); + } }