changeset 10625:9eb235c6dc0a

[gaim-migrate @ 12099] This should make Tcl 8.3 happier committer: Tailor Script <tailor@pidgin.im>
author Ethan Blanton <elb@pidgin.im>
date Wed, 23 Feb 2005 02:14:18 +0000
parents 235e72d7bb0a
children 06f5cc17cddc
files plugins/tcl/tcl_signals.c
diffstat 1 files changed, 16 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/plugins/tcl/tcl_signals.c	Tue Feb 22 16:54:56 2005 +0000
+++ b/plugins/tcl/tcl_signals.c	Wed Feb 23 02:14:18 2005 +0000
@@ -211,13 +211,27 @@
 			}
 		case GAIM_TYPE_INT64:
 		case GAIM_TYPE_UINT64:
+			/* Tcl < 8.4 doesn't have wide ints, so we have ugly
+			 * ifdefs in here */
 			if (gaim_value_is_outgoing(handler->argtypes[i])) {
-				vals[i] = (void *)va_arg(args, guint64 *);
+				vals[i] = (void *)va_arg(args, gint64 *);
+				#if (TCL_MAJOR_VERSION >= 8 && TCL_MINOR_VERSION >= 4)
 				Tcl_LinkVar(handler->interp, name->str,
 					    vals[i], TCL_LINK_WIDE_INT);
+				#else
+				/* This is going to cause weirdness at best,
+				 * but what do you want ... we're losing
+				 * precision */
+				Tcl_LinkVar(handler->interp, name->str,
+					    vals[i], TCL_LINK_INT);
+				#endif /* Tcl >= 8.4 */
 				arg = Tcl_NewStringObj(name->str, -1);
 			} else {
-				arg = Tcl_NewWideIntObj(va_arg(args, guint64));
+				#if (TCL_MAJOR_VERSION >= 8 && TCL_MINOR_VERSION >= 4)
+				arg = Tcl_NewWideIntObj(va_arg(args, gint64));
+				#else
+				arg = Tcl_NewIntObj((int)va_arg(args, int));
+				#endif /* Tcl >= 8.4 */
 			}
 			break;
 		case GAIM_TYPE_STRING: