aboutsummaryrefslogtreecommitdiff
path: root/lundump.c
diff options
context:
space:
mode:
Diffstat (limited to 'lundump.c')
-rw-r--r--lundump.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/lundump.c b/lundump.c
index 0c3b5fd7..225eda28 100644
--- a/lundump.c
+++ b/lundump.c
@@ -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*/
53double luaU_str2d (char* b, char* where) 53double 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
79static int LoadInt (ZIO* Z, char* message) 79static 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
170static void LoadSignature (ZIO* Z) 170static 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*/
234void luaU_badconstant (char* s, int i, TObject* o, TProtoFunc* tf) 234void 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}