diff options
| author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2001-03-26 11:31:49 -0300 |
|---|---|---|
| committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2001-03-26 11:31:49 -0300 |
| commit | dd3a63c205a97339d8c8aec3cd49941bc10ba45c (patch) | |
| tree | 763c1701607ace52692c8566277c6c70c7895acd /lundump.c | |
| parent | cb49b088b61b75b905663a58a2c545de1ffea13a (diff) | |
| download | lua-github-dd3a63c205a97339d8c8aec3cd49941bc10ba45c.tar.gz | |
new way to handle `profiles'
Diffstat (limited to 'lundump.c')
| -rw-r--r-- | lundump.c | 12 |
1 files changed, 8 insertions, 4 deletions
@@ -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 <stdio.h> #include <string.h> +#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; } |
