classpath-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[cp-patches] FYI: gnu_java_awt_peer_gtk_GtkClipboard.c 64-bit fix


From: Christian Thalinger
Subject: [cp-patches] FYI: gnu_java_awt_peer_gtk_GtkClipboard.c 64-bit fix
Date: Mon, 07 Nov 2005 20:36:47 +0100

Hi!

As discussed with mark on classpath list, i checked this in.

TWISTI


2005-11-07  Christian Thalinger  <address@hidden>

        * native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkClipboard.c: 
        Use long for 64-bit architectures.


Index: native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkClipboard.c
===================================================================
RCS
file: 
/cvsroot/classpath/classpath/native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkClipboard.c,v
retrieving revision 1.16
diff -u -3 -p -r1.16 gnu_java_awt_peer_gtk_GtkClipboard.c
--- native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkClipboard.c    4 Sep
2005 00:03:58 -0000       1.16
+++ native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkClipboard.c    7 Nov
2005 19:35:09 -0000
@@ -53,7 +53,11 @@ jstring cp_gtk_imageTarget;
 jstring cp_gtk_filesTarget;
 
 /* Simple id to keep track of the selection we are currently managing.
*/
+#if SIZEOF_VOID_P == 8
+static long current_selection = 0;
+#else
 static int current_selection = 0;
+#endif
 
 /* Whether we "own" the clipboard. And may clear it. */
 static int owner = 0;
@@ -261,7 +265,11 @@ static void
 clipboard_clear_func (GtkClipboard *clipboard __attribute__((unused)),
                      gpointer user_data)
 {
+#if SIZEOF_VOID_P == 8
+  if (owner && (long) user_data == current_selection)
+#else
   if (owner && (int) user_data == current_selection)
+#endif
     {
       JNIEnv *env = cp_gtk_gdk_env();
       owner = 0;






reply via email to

[Prev in Thread] Current Thread [Next in Thread]