From dd3a63c205a97339d8c8aec3cd49941bc10ba45c Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Mon, 26 Mar 2001 11:31:49 -0300 Subject: new way to handle `profiles' --- lundump.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'lundump.c') diff --git a/lundump.c b/lundump.c index 353e746e..f12bade5 100644 --- a/lundump.c +++ b/lundump.c @@ -1,5 +1,5 @@ /* -** $Id: lundump.c,v 1.38 2001/01/15 16:13:24 roberto Exp roberto $ +** $Id: lundump.c,v 1.39 2001/02/23 17:17:25 roberto Exp roberto $ ** load bytecodes from files ** See Copyright Notice in lua.h */ @@ -7,6 +7,9 @@ #include #include +#define LUA_PRIVATE +#include "lua.h" + #include "lfunc.h" #include "lmem.h" #include "lopcodes.h" @@ -96,7 +99,7 @@ static TString* LoadString (lua_State* L, ZIO* Z, int swap) return NULL; else { - l_char* s=luaO_openspace(L,size); + char* s=luaO_openspace(L,size,char); LoadBlock(L,s,size,Z,0); return luaS_newlstr(L,s,size-1); /* remove trailing l_c('\0') */ } @@ -171,7 +174,7 @@ static Proto* LoadFunction (lua_State* L, ZIO* Z, int swap) static void LoadSignature (lua_State* L, ZIO* Z) { - const l_char* s=SIGNATURE; + const l_char* s=l_s(SIGNATURE); while (*s!=0 && ezgetc(L,Z)==*s) ++s; if (*s!=0) luaO_verror(L,l_s("bad signature in `%.99s'"),ZNAME(Z)); @@ -213,7 +216,8 @@ static int LoadHeader (lua_State* L, ZIO* Z) f=LoadNumber(L,Z,swap); if ((long)f!=(long)tf) /* disregard errors in last bit of fraction */ luaO_verror(L,l_s("unknown number format in `%.99s':\n") - l_s(" read ") NUMBER_FMT l_s("; expected ") NUMBER_FMT, ZNAME(Z),f,tf); + l_s(" read ") l_s(LUA_NUMBER_FMT) l_s("; expected ") l_s(LUA_NUMBER_FMT), + ZNAME(Z),f,tf); return swap; } -- cgit v1.2.3-55-g6feb