mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-07-06 22:12:47 -05:00
Fixes for Debian bug #192701 (64-bit gccs warn about casts between
ptrs and ints of different size and -Werror makes this serious). The GTK bits are done by Colin's patch to use GINT_TO_POINTER (thanks); the uxnet bits are done by cleaning up the rest of the code. In particular, network.h now typedefs `OSSocket' to be a type capable of holding whatever the OS's socket data type is that underlies our socket abstraction. Individual platforms can make this typedef themselves if they define OSSOCKET_DEFINED to prevent network.h redoing it; so the Unix OSSocket is now int. Default is still void *, so other platforms should be unaffected. [originally from svn r3171]
This commit is contained in:
@ -2485,7 +2485,8 @@ void copy_all_menuitem(GtkMenuItem *item, gpointer data)
|
||||
void special_menuitem(GtkMenuItem *item, gpointer data)
|
||||
{
|
||||
struct gui_data *inst = (struct gui_data *)data;
|
||||
int code = (int)gtk_object_get_data(GTK_OBJECT(item), "user-data");
|
||||
int code = GPOINTER_TO_INT(gtk_object_get_data(GTK_OBJECT(item),
|
||||
"user-data"));
|
||||
|
||||
inst->back->special(inst->backhandle, code);
|
||||
}
|
||||
@ -2836,7 +2837,7 @@ void update_specials_menu(void *frontend)
|
||||
if (*specials[i].name) {
|
||||
menuitem = gtk_menu_item_new_with_label(specials[i].name);
|
||||
gtk_object_set_data(GTK_OBJECT(menuitem), "user-data",
|
||||
(gpointer)specials[i].code);
|
||||
GINT_TO_POINTER(specials[i].code));
|
||||
gtk_signal_connect(GTK_OBJECT(menuitem), "activate",
|
||||
GTK_SIGNAL_FUNC(special_menuitem), inst);
|
||||
} else
|
||||
|
Reference in New Issue
Block a user