changeset 13946:4d577b63299a

[gaim-migrate @ 16486] Fix some more 64-bit warnings. The "handle" warnings remain, because they're real problems on 64-bit systems and they still need fixin'. I'm not sure how to best fix them just yet. committer: Tailor Script <tailor@pidgin.im>
author Ethan Blanton <elb@pidgin.im>
date Tue, 11 Jul 2006 16:22:28 +0000
parents af56c955ec5f
children 25c55fb4b512
files plugins/tcl/tcl.c plugins/tcl/tcl_gaim.h plugins/tcl/tcl_signals.c
diffstat 3 files changed, 13 insertions(+), 13 deletions(-) [+]
line wrap: on
line diff
--- a/plugins/tcl/tcl.c	Tue Jul 11 16:11:30 2006 +0000
+++ b/plugins/tcl/tcl.c	Tue Jul 11 16:22:28 2006 +0000
@@ -54,10 +54,12 @@
 GaimStringref *GaimTclRefConnection;
 GaimStringref *GaimTclRefConversation;
 GaimStringref *GaimTclRefPointer;
+GaimStringref *GaimTclRefPlugin;
 GaimStringref *GaimTclRefPresence;
 GaimStringref *GaimTclRefStatus;
 GaimStringref *GaimTclRefStatusAttr;
 GaimStringref *GaimTclRefStatusType;
+GaimStringref *GaimTclRefXfer;
 
 static GHashTable *tcl_plugins = NULL;
 
@@ -186,7 +188,7 @@
 	buf = g_malloc(len + 1);
 
 	cur = buf;
-	while (fgets(cur, (int) buf - (buf - cur), fp)) {
+	while (fgets(cur, GPOINTER_TO_INT(buf) - (buf - cur), fp)) {
 		cur += strlen(cur);
 		if (feof(fp))
 			break;
@@ -353,10 +355,12 @@
 	GaimTclRefConnection = gaim_stringref_new("Connection");
 	GaimTclRefConversation = gaim_stringref_new("Conversation");
 	GaimTclRefPointer = gaim_stringref_new("Pointer");
+	GaimTclRefPlugin = gaim_stringref_new("Plugin");
 	GaimTclRefPresence = gaim_stringref_new("Presence");
 	GaimTclRefStatus = gaim_stringref_new("Status");
 	GaimTclRefStatusAttr = gaim_stringref_new("StatusAttr");
 	GaimTclRefStatusType = gaim_stringref_new("StatusType");
+	GaimTclRefXfer = gaim_stringref_new("Xfer");
 
 	tcl_plugins = g_hash_table_new(g_direct_hash, g_direct_equal);
 
--- a/plugins/tcl/tcl_gaim.h	Tue Jul 11 16:11:30 2006 +0000
+++ b/plugins/tcl/tcl_gaim.h	Tue Jul 11 16:22:28 2006 +0000
@@ -70,10 +70,12 @@
 extern GaimStringref *GaimTclRefConnection;
 extern GaimStringref *GaimTclRefConversation;
 extern GaimStringref *GaimTclRefPointer;
+extern GaimStringref *GaimTclRefPlugin;
 extern GaimStringref *GaimTclRefPresence;
 extern GaimStringref *GaimTclRefStatus;
 extern GaimStringref *GaimTclRefStatusAttr;
 extern GaimStringref *GaimTclRefStatusType;
+extern GaimStringref *GaimTclRefXfer;
 
 GaimPlugin *tcl_interp_get_plugin(Tcl_Interp *interp);
 
--- a/plugins/tcl/tcl_signals.c	Tue Jul 11 16:11:30 2006 +0000
+++ b/plugins/tcl/tcl_signals.c	Tue Jul 11 16:22:28 2006 +0000
@@ -143,8 +143,12 @@
 		return GaimTclRefConnection;
 	case GAIM_SUBTYPE_CONVERSATION:
 		return GaimTclRefConversation;
+	case GAIM_SUBTYPE_PLUGIN:
+		return GaimTclRefPlugin;
 	case GAIM_SUBTYPE_STATUS:
 		return GaimTclRefStatus;
+	case GAIM_SUBTYPE_XFER:
+		return GaimTclRefXfer;
 	default:
 		return NULL;
 	}
@@ -270,22 +274,12 @@
 			case GAIM_SUBTYPE_CONNECTION:
 			case GAIM_SUBTYPE_CONVERSATION:
 			case GAIM_SUBTYPE_STATUS:
+			case GAIM_SUBTYPE_PLUGIN:
+			case GAIM_SUBTYPE_XFER:
 				if (gaim_value_is_outgoing(handler->argtypes[i]))
 					gaim_debug_error("tcl", "pointer subtypes do not currently support outgoing arguments\n");
 				arg = gaim_tcl_ref_new(ref_type(gaim_value_get_subtype(handler->argtypes[i])), va_arg(args, void *));
 				break;
-			case GAIM_SUBTYPE_PLUGIN:
-			case GAIM_SUBTYPE_XFER:
-				/* pointers again */
-				if (gaim_value_is_outgoing(handler->argtypes[i])) {
-					vals[i] = va_arg(args, void **);
-					Tcl_LinkVar(handler->interp, name->str,
-						    vals[i], TCL_LINK_INT);
-					arg = Tcl_NewStringObj(name->str, -1);
-				} else {
-					arg = Tcl_NewIntObj((int)va_arg(args, void *));
-				}
-				break;
 			case GAIM_SUBTYPE_BLIST:
 			case GAIM_SUBTYPE_BLIST_BUDDY:
 			case GAIM_SUBTYPE_BLIST_GROUP: