diff options
| author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2014-06-18 10:54:31 -0300 |
|---|---|---|
| committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2014-06-18 10:54:31 -0300 |
| commit | 04da0a40c0a541c32140ac952823a9d768cfaf8d (patch) | |
| tree | 9a079be7794409d8440bb3526a1905c9f4d77ed1 | |
| parent | eb678282368c8b31289e999da777a4d79abcfdfe (diff) | |
| download | lua-04da0a40c0a541c32140ac952823a9d768cfaf8d.tar.gz lua-04da0a40c0a541c32140ac952823a9d768cfaf8d.tar.bz2 lua-04da0a40c0a541c32140ac952823a9d768cfaf8d.zip | |
added assertion about sources being the same for all protos in a chunk
| -rw-r--r-- | ldump.c | 6 |
1 files changed, 4 insertions, 2 deletions
| @@ -1,5 +1,5 @@ | |||
| 1 | /* | 1 | /* |
| 2 | ** $Id: ldump.c,v 2.29 2014/04/01 14:39:55 roberto Exp roberto $ | 2 | ** $Id: ldump.c,v 2.30 2014/06/18 13:21:12 roberto Exp roberto $ |
| 3 | ** save precompiled Lua chunks | 3 | ** save precompiled Lua chunks |
| 4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
| 5 | */ | 5 | */ |
| @@ -120,8 +120,10 @@ static void DumpConstants (const Proto *f, DumpState *D) { | |||
| 120 | } | 120 | } |
| 121 | n = f->sizep; | 121 | n = f->sizep; |
| 122 | DumpInt(n, D); | 122 | DumpInt(n, D); |
| 123 | for (i = 0; i < n; i++) | 123 | for (i = 0; i < n; i++) { |
| 124 | lua_assert(f->source == f->p[i]->source); /* same source for all protos */ | ||
| 124 | DumpFunction(f->p[i], D); | 125 | DumpFunction(f->p[i], D); |
| 126 | } | ||
| 125 | } | 127 | } |
| 126 | 128 | ||
| 127 | 129 | ||
