Re: [cp-patches] FYI: gnu_java_awt_peer_gtk_GtkClipboard.c 64-bit fix
Hi, On Sun, 2005-11-20 at 22:05 +0100, Mark Wielaard wrote: According to http://developer.gnome.org/doc/API/2.0/glib/glib-Type-Conversion-Macros.html the following seems appropriate: 2005-11-20 Mark Wielaard [EMAIL PROTECTED] * native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkClipboard.c (current_selection): Define as gint. (clipboard_clear_func): Extract user_data with GPOINTER_TO_INT. (Java_gnu_java_awt_peer_gtk_GtkClipboard_advertiseContent): Convert current_selection with GINT_TO_POINTER. Since we are only using the current_selection as small counter anyway. Does this work for you? This seems to work, but Christian wasn't able to test it because of [Bug awt/24981] too many local references in GtkSelection.c. I need to look into that one later (if Christian doesn't beat me to it). But I will commit this patch now since it seems correct. Cheers, Mark ___ Classpath-patches mailing list Classpath-patches@gnu.org http://lists.gnu.org/mailman/listinfo/classpath-patches
Re: [cp-patches] FYI: gnu_java_awt_peer_gtk_GtkClipboard.c 64-bit fix
On Mon, 2005-11-07 at 21:36 +0100, Christian Thalinger wrote: On Mon, 2005-11-07 at 14:15 -0700, Tom Tromey wrote: Twisti == Christian Thalinger [EMAIL PROTECTED] writes: Twisti +#if SIZEOF_VOID_P == 8 Twisti +static long current_selection = 0; Twisti +#else Twisti static int current_selection = 0; Twisti +#endif How about, instead of testing SIZEOF_VOID_P all over, we use a typedef? Or, given that this is gtk-using code, use the GPOINTER_TO_SIZE and GSIZE_TO_POINTER macros where appropriate? Sounds good to me. Didn't know that such macros exist in classpath. In CACAO we use a typedef for such stuff. So, what is the suggested fix now? TWISTI ___ Classpath-patches mailing list Classpath-patches@gnu.org http://lists.gnu.org/mailman/listinfo/classpath-patches
Re: [cp-patches] FYI: gnu_java_awt_peer_gtk_GtkClipboard.c 64-bit fix
Twisti == Christian Thalinger [EMAIL PROTECTED] writes: Twisti +#if SIZEOF_VOID_P == 8 Twisti +static long current_selection = 0; Twisti +#else Twisti static int current_selection = 0; Twisti +#endif How about, instead of testing SIZEOF_VOID_P all over, we use a typedef? Or, given that this is gtk-using code, use the GPOINTER_TO_SIZE and GSIZE_TO_POINTER macros where appropriate? Tom ___ Classpath-patches mailing list Classpath-patches@gnu.org http://lists.gnu.org/mailman/listinfo/classpath-patches