mirror of https://github.com/rusefi/lua.git
function constants may include boolean values
This commit is contained in:
parent
67391a35da
commit
5d834bdf57
5
ldump.c
5
ldump.c
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
** $Id: ldump.c,v 1.7 2004/06/09 21:03:53 lhf Exp lhf $
|
** $Id: ldump.c,v 2.3 2004/07/09 18:24:41 roberto Exp $
|
||||||
** save pre-compiled Lua chunks
|
** save pre-compiled Lua chunks
|
||||||
** See Copyright Notice in lua.h
|
** See Copyright Notice in lua.h
|
||||||
*/
|
*/
|
||||||
|
@ -121,6 +121,9 @@ static void DumpConstants(const Proto* f, DumpState* D)
|
||||||
break;
|
break;
|
||||||
case LUA_TNIL:
|
case LUA_TNIL:
|
||||||
break;
|
break;
|
||||||
|
case LUA_TBOOLEAN:
|
||||||
|
DumpByte(bvalue(o),D);
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
lua_assert(0); /* cannot happen */
|
lua_assert(0); /* cannot happen */
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
** $Id: lundump.c,v 2.1 2003/12/10 12:13:36 roberto Exp roberto $
|
** $Id: lundump.c,v 2.2 2004/04/30 20:13:38 roberto Exp $
|
||||||
** load pre-compiled Lua chunks
|
** load pre-compiled Lua chunks
|
||||||
** See Copyright Notice in lua.h
|
** See Copyright Notice in lua.h
|
||||||
*/
|
*/
|
||||||
|
@ -179,6 +179,9 @@ static void LoadConstants (LoadState* S, Proto* f)
|
||||||
case LUA_TNIL:
|
case LUA_TNIL:
|
||||||
setnilvalue(o);
|
setnilvalue(o);
|
||||||
break;
|
break;
|
||||||
|
case LUA_TBOOLEAN:
|
||||||
|
setbvalue(o, LoadByte(S));
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
luaG_runerror(L,"bad constant type (%d) in %s",t,S->name);
|
luaG_runerror(L,"bad constant type (%d) in %s",t,S->name);
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Reference in New Issue