[Scummvm-cvs-logs] CVS: residual/lua lobject.h,1.2,1.3 lrestore.cpp,1.5,1.6 lstring.cpp,1.3,1.4 lundump.cpp,1.4,1.5

Pawel Kolodziejski aquadran at users.sourceforge.net
Sun Apr 3 04:01:36 CEST 2005


Update of /cvsroot/scummvm/residual/lua
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15396

Modified Files:
	lobject.h lrestore.cpp lstring.cpp lundump.cpp 
Log Message:
patch fixes from Erich Hoover:
lua 64 bit fixes

Index: lobject.h
===================================================================
RCS file: /cvsroot/scummvm/residual/lua/lobject.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- lobject.h	14 Jan 2005 20:33:01 -0000	1.2
+++ lobject.h	3 Apr 2005 11:00:49 -0000	1.3
@@ -52,7 +52,7 @@
 #define MAX_WORD	65534
 #endif
 
-typedef unsigned int IntPoint; /* unsigned with same size as a pointer (for hashing) */
+typedef unsigned long IntPoint; /* unsigned with same size as a pointer (for hashing) */
 
 
 /*

Index: lrestore.cpp
===================================================================
RCS file: /cvsroot/scummvm/residual/lua/lrestore.cpp,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- lrestore.cpp	14 Jan 2005 20:33:01 -0000	1.5
+++ lrestore.cpp	3 Apr 2005 11:00:49 -0000	1.6
@@ -43,7 +43,7 @@
 
 static void recreateObj(TObject *obj) {
 	if (obj->ttype == LUA_T_CPROTO) {
-		int some = ((int)(obj->value.f)) >> 16;
+		long some = ((long)(obj->value.f)) >> 16;
 		luaL_libList *list = list_of_libs;
 		while (list != NULL) {
 			if (some == 0)
@@ -52,7 +52,7 @@
 			list = list->next;
 		}
 
-		int numberFunc = (int)(obj->value.f) & 0xffff;
+		long numberFunc = (long)(obj->value.f) & 0xffff;
 		if ((list != NULL) && (some == 0) && (numberFunc < list->number)) {
 			obj->value.f = list->list[numberFunc].func;
 		} else {
@@ -103,7 +103,7 @@
 			return;
 		}
 
-		obj->value.i = (unsigned int)found->object;
+		obj->value.i = (long)found->object;
 	}
 }
 
@@ -151,7 +151,7 @@
 			else
 				tempString = luaS_createudata(value, tag);
 			if (restoreCallback != NULL) {
-				tempString->u.s.globalval.value.ts = (TaggedString *)restoreCallback(tempString->u.s.globalval.ttype, (int)tempString->u.s.globalval.value.ts, restoreFunc);
+				tempString->u.s.globalval.value.ts = (TaggedString *)restoreCallback(tempString->u.s.globalval.ttype, (long)tempString->u.s.globalval.value.ts, restoreFunc);
 			}
 		}
 		tempString->constindex = constIndex;

Index: lstring.cpp
===================================================================
RCS file: /cvsroot/scummvm/residual/lua/lstring.cpp,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- lstring.cpp	30 Dec 2004 07:37:13 -0000	1.3
+++ lstring.cpp	3 Apr 2005 11:00:49 -0000	1.4
@@ -174,7 +174,7 @@
 
 TaggedString *luaS_createudata (void *udata, int tag)
 {
-  return insert_u(udata, tag, &L->string_root[(unsigned)udata%NUM_HASHS]);
+  return insert_u(udata, tag, &L->string_root[(long)udata%NUM_HASHS]);
 }
 
 TaggedString *luaS_newlstr (char *str, long l)

Index: lundump.cpp
===================================================================
RCS file: /cvsroot/scummvm/residual/lua/lundump.cpp,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- lundump.cpp	13 Jan 2005 18:36:46 -0000	1.4
+++ lundump.cpp	3 Apr 2005 11:00:49 -0000	1.5
@@ -120,7 +120,7 @@
  {
   TObject* o=tf->consts+i;
   ttype(o)=(lua_Type)-ezgetc(Z);
-  switch (ttype(o))
+  switch ((unsigned)ttype(o))
   {
    case -'N':
         ttype(o)=LUA_T_NUMBER;





More information about the Scummvm-git-logs mailing list