diff options
author | Lua Team <team@lua.org> | 2013-07-06 12:00:00 +0000 |
---|---|---|
committer | repogen <> | 2013-07-06 12:00:00 +0000 |
commit | 87cc247b6b22184fba47184c218a642ea7a49e96 (patch) | |
tree | 299ba8b72b95aa32336b5c810b7133f8efc4fb29 /src/lundump.c | |
parent | dc27609467d2699ac9252e89d632432ac5f798f2 (diff) | |
download | lua-github-5.3.0-work1.tar.gz |
Lua 5.3.0-work15.3.0-work1
Diffstat (limited to 'src/lundump.c')
-rw-r--r-- | src/lundump.c | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/src/lundump.c b/src/lundump.c index 54de011a..38b04e42 100644 --- a/src/lundump.c +++ b/src/lundump.c @@ -1,5 +1,5 @@ /* -** $Id: lundump.c,v 2.22 2012/05/08 13:53:33 roberto Exp $ +** $Id: lundump.c,v 2.23 2013/04/26 18:48:35 roberto Exp $ ** load precompiled Lua chunks ** See Copyright Notice in lua.h */ @@ -69,6 +69,13 @@ static lua_Number LoadNumber(LoadState* S) return x; } +static lua_Integer LoadInteger(LoadState* S) +{ + lua_Integer x; + LoadVar(S,x); + return x; +} + static TString* LoadString(LoadState* S) { size_t size; @@ -112,10 +119,13 @@ static void LoadConstants(LoadState* S, Proto* f) case LUA_TBOOLEAN: setbvalue(o,LoadChar(S)); break; - case LUA_TNUMBER: + case LUA_TNUMFLT: setnvalue(o,LoadNumber(S)); break; - case LUA_TSTRING: + case LUA_TNUMINT: + setivalue(o,LoadInteger(S)); + break; + case LUA_TSHRSTR: case LUA_TLNGSTR: setsvalue2n(S->L,o,LoadString(S)); break; default: lua_assert(0); |