[kaffe] CVS kaffe (robilad): portability fix for kaffe-qt-awt

Kaffe CVS cvs-commits at kaffe.org
Fri Sep 16 16:18:33 PDT 2005


PatchSet 6911 
Date: 2005/09/16 23:14:02
Author: robilad
Branch: HEAD
Tag: (none) 
Log:
portability fix for kaffe-qt-awt

2005-09-16  Dalibor Topic  <robilad at kaffe.org>

        * libraries/clib/awt/qt/fnt.cc:
        (Java_java_awt_Toolkit_fntBytesWidth)
        Cast jb to uintptr_t for portable pointer arithmetic.

        Suggested by:  Gwenole Beauchesne <gbeauchesne at mandriva.com>

Members: 
	ChangeLog:1.4432->1.4433 
	libraries/clib/awt/qt/fnt.cc:1.8->1.9 

Index: kaffe/ChangeLog
diff -u kaffe/ChangeLog:1.4432 kaffe/ChangeLog:1.4433
--- kaffe/ChangeLog:1.4432	Fri Sep 16 22:25:15 2005
+++ kaffe/ChangeLog	Fri Sep 16 23:14:02 2005
@@ -1,5 +1,13 @@
 2005-09-16  Dalibor Topic  <robilad at kaffe.org>
 
+	* libraries/clib/awt/qt/fnt.cc: 
+	(Java_java_awt_Toolkit_fntBytesWidth) 
+	Cast jb to uintptr_t for portable pointer arithmetic.
+
+	Suggested by:  Gwenole Beauchesne <gbeauchesne at mandriva.com>
+
+2005-09-16  Dalibor Topic  <robilad at kaffe.org>
+
 	Resynced with GNU Classpath.
 
 	2005-09-16  David Gilbert  <david.gilbert at object-refinery.com>
Index: kaffe/libraries/clib/awt/qt/fnt.cc
diff -u kaffe/libraries/clib/awt/qt/fnt.cc:1.8 kaffe/libraries/clib/awt/qt/fnt.cc:1.9
--- kaffe/libraries/clib/awt/qt/fnt.cc:1.8	Fri Sep 16 14:44:49 2005
+++ kaffe/libraries/clib/awt/qt/fnt.cc	Fri Sep 16 23:14:04 2005
@@ -14,6 +14,8 @@
 #include <qfont.h>
 #include <qfontmetrics.h>
 
+#include "config.h"
+#include "config-int.h"
 #include "toolkit.h"
 
 /**
@@ -187,7 +189,7 @@
   if ( off  + len > n ) 
     len = n - off;
   QByteArray a;
-  a.setRawData((const char*)((long)jb + off), len);
+  a.setRawData((const char*)((uintptr_t)jb + off), len);
   w = fm.width(QString(a),len);
   env->ReleaseByteArrayElements( jBytes, jb, JNI_ABORT);
   DBG(AWT_FNT, qqDebug("fntBytesWidth %s %d\n",jb + off, w));



More information about the kaffe mailing list