diff options
Diffstat (limited to 'lundump.c')
-rw-r--r-- | lundump.c | 12 |
1 files changed, 6 insertions, 6 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: lundump.c,v 1.21 1999/07/02 19:34:26 lhf Exp $ | 2 | ** $Id: lundump.c,v 1.12 1999/07/08 12:43:23 roberto Exp roberto $ |
3 | ** load bytecodes from files | 3 | ** load bytecodes from files |
4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
5 | */ | 5 | */ |
@@ -50,7 +50,7 @@ static unsigned long LoadLong (ZIO* Z) | |||
50 | /* | 50 | /* |
51 | * convert number from text | 51 | * convert number from text |
52 | */ | 52 | */ |
53 | double luaU_str2d (char* b, char* where) | 53 | double luaU_str2d (const char* b, const char* where) |
54 | { | 54 | { |
55 | int negative=(b[0]=='-'); | 55 | int negative=(b[0]=='-'); |
56 | double x=luaO_str2d(b+negative); | 56 | double x=luaO_str2d(b+negative); |
@@ -76,7 +76,7 @@ static real LoadNumber (ZIO* Z, int native) | |||
76 | } | 76 | } |
77 | } | 77 | } |
78 | 78 | ||
79 | static int LoadInt (ZIO* Z, char* message) | 79 | static int LoadInt (ZIO* Z, const char* message) |
80 | { | 80 | { |
81 | unsigned long l=LoadLong(Z); | 81 | unsigned long l=LoadLong(Z); |
82 | unsigned int i=l; | 82 | unsigned int i=l; |
@@ -169,7 +169,7 @@ static TProtoFunc* LoadFunction (ZIO* Z, int native) | |||
169 | 169 | ||
170 | static void LoadSignature (ZIO* Z) | 170 | static void LoadSignature (ZIO* Z) |
171 | { | 171 | { |
172 | char* s=SIGNATURE; | 172 | const char* s=SIGNATURE; |
173 | while (*s!=0 && ezgetc(Z)==*s) | 173 | while (*s!=0 && ezgetc(Z)==*s) |
174 | ++s; | 174 | ++s; |
175 | if (*s!=0) luaL_verror("bad signature in %s",zname(Z)); | 175 | if (*s!=0) luaL_verror("bad signature in %s",zname(Z)); |
@@ -231,9 +231,9 @@ TProtoFunc* luaU_undump1 (ZIO* Z) | |||
231 | /* | 231 | /* |
232 | * handle constants that cannot happen | 232 | * handle constants that cannot happen |
233 | */ | 233 | */ |
234 | void luaU_badconstant (char* s, int i, TObject* o, TProtoFunc* tf) | 234 | void luaU_badconstant (const char* s, int i, const TObject* o, TProtoFunc* tf) |
235 | { | 235 | { |
236 | int t=ttype(o); | 236 | int t=ttype(o); |
237 | char* name= (t>0 || t<LUA_T_LINE) ? "?" : luaO_typenames[-t]; | 237 | const char* name= (t>0 || t<LUA_T_LINE) ? "?" : luaO_typenames[-t]; |
238 | luaL_verror("cannot %s constant #%d: type=%d [%s]" IN,s,i,t,name,INLOC); | 238 | luaL_verror("cannot %s constant #%d: type=%d [%s]" IN,s,i,t,name,INLOC); |
239 | } | 239 | } |