[evolution-patches] [Fwd: [PATCH] soup is not 64-bit clean]



Matt's not subscribed and since evolution-patches is subscriber only...

Jeremy

-----Forwarded Message-----
From: Matt Wilson <msw redhat com>
To: evolution-patches ximian com
Subject: [PATCH] soup is not 64-bit clean
Date: 02 Apr 2003 11:55:41 -0500

Attached is a patch to fix (OBVIOUS) 64 bit errors in soup.

Cheers,

Matt
msw redhat com
--
Matt Wilson
Manager, Base Operating Systems
Red Hat, Inc.
--- soup-0.7.10/src/libsoup/soup-private.h.64bit	2002-12-03 16:12:48.000000000 -0500
+++ soup-0.7.10/src/libsoup/soup-private.h	2003-04-02 06:25:18.000000000 -0500
@@ -133,8 +133,8 @@
 
 struct _SoupMessagePrivate {
 	SoupConnectId      connect_tag;
-	guint              read_tag;
-	guint              write_tag;
+	gpointer           read_tag;
+	gpointer           write_tag;
 	guint              timeout_tag;
 
 	guint              retries;
--- soup-0.7.10/src/libsoup/soup-transfer.c.64bit	2003-04-02 05:54:45.000000000 -0500
+++ soup-0.7.10/src/libsoup/soup-transfer.c	2003-04-02 06:15:37.000000000 -0500
@@ -115,9 +115,9 @@
 #define UNIGNORE_CANCEL(t) (t)->processing = FALSE;
 
 void
-soup_transfer_read_cancel (guint tag)
+soup_transfer_read_cancel (gpointer tag)
 {
-	SoupReader *r = GINT_TO_POINTER (tag);
+	SoupReader *r = (SoupReader *) tag;
 
 	if (r->processing) return;
 
@@ -132,14 +132,14 @@
 }
 
 void 
-soup_transfer_read_set_callbacks (guint                   tag,
+soup_transfer_read_set_callbacks (gpointer                tag,
 				  SoupReadHeadersDoneFn   headers_done_cb,
 				  SoupReadChunkFn         read_chunk_cb,
 				  SoupReadDoneFn          read_done_cb,
 				  SoupReadErrorFn         error_cb,
 				  gpointer                user_data)
 {
-	SoupReader *r = GINT_TO_POINTER (tag);
+	SoupReader *r = (SoupReader *) tag;
 
 	r->headers_done_cb = headers_done_cb;
 	r->read_chunk_cb = read_chunk_cb;
@@ -197,7 +197,7 @@
 	UNIGNORE_CANCEL (r);
 
  CANCELLED:
-	soup_transfer_read_cancel (GPOINTER_TO_INT (r));
+	soup_transfer_read_cancel (r);
 
 	return FALSE;
 }
@@ -519,12 +519,12 @@
 	issue_final_callback (r);
 
  FINISH_READ:
-	soup_transfer_read_cancel (GPOINTER_TO_INT (r));
+	soup_transfer_read_cancel (r);
 
 	return FALSE;
 }
 
-guint
+gpointer
 soup_transfer_read (GIOChannel            *chan,
 		    gboolean               overwrite_chunks,
 		    SoupReadHeadersDoneFn  headers_done_cb,
@@ -558,13 +558,13 @@
 				(GIOFunc) soup_transfer_read_error_cb,
 				reader);
 
-	return GPOINTER_TO_INT (reader);
+	return reader;
 }
 
 void
-soup_transfer_write_cancel (guint tag)
+soup_transfer_write_cancel (gpointer tag)
 {
-	SoupWriter *w = GINT_TO_POINTER (tag);
+	SoupWriter *w = (SoupWriter *) tag;
 
 	if (w->processing) return;
 
@@ -588,7 +588,7 @@
 		UNIGNORE_CANCEL (w);
 	}
 
-	soup_transfer_write_cancel (GPOINTER_TO_INT (w));
+	soup_transfer_write_cancel (w);
 
 	return FALSE;
 }
@@ -740,7 +740,7 @@
 		UNIGNORE_CANCEL (w);
 	}
 
-	soup_transfer_write_cancel (GPOINTER_TO_INT (w));
+	soup_transfer_write_cancel (w);
 
  DONE_WRITING:
 	RESTORE_PIPE (pipe_handler);
@@ -784,7 +784,7 @@
 	return writer;
 }
 
-guint 
+gpointer
 soup_transfer_write_simple (GIOChannel             *chan,
 			    GString                *header,
 			    const SoupDataBuffer   *src,
@@ -812,10 +812,10 @@
 				     src->body, 
 				     src->length);
 
-	return GPOINTER_TO_INT (writer);
+	return writer;
 }
 
-guint 
+gpointer 
 soup_transfer_write (GIOChannel             *chan,
 		     SoupTransferEncoding    encoding,
 		     SoupWriteGetHeaderFn    get_header_cb,
@@ -835,13 +835,13 @@
 	writer->get_header_cb = get_header_cb;
 	writer->get_chunk_cb = get_chunk_cb;
 
-	return GPOINTER_TO_INT (writer);
+	return writer;
 }
 
 void  
-soup_transfer_write_pause (guint tag)
+soup_transfer_write_pause (gpointer tag)
 {
-	SoupWriter *w = GINT_TO_POINTER (tag);
+	SoupWriter *w = (SoupWriter *) tag;
 
 	g_return_if_fail (tag != 0);
 
@@ -852,9 +852,9 @@
 }
 
 void  
-soup_transfer_write_unpause (guint tag)
+soup_transfer_write_unpause (gpointer tag)
 {
-	SoupWriter *w = GINT_TO_POINTER (tag);
+	SoupWriter *w = (SoupWriter *) tag;
 
 	g_return_if_fail (tag != 0);
 
--- soup-0.7.10/src/libsoup/soup-transfer.h.64bit	2002-04-05 15:46:35.000000000 -0500
+++ soup-0.7.10/src/libsoup/soup-transfer.h	2003-04-02 06:19:16.000000000 -0500
@@ -40,17 +40,17 @@
 
 typedef void (*SoupReadErrorFn) (gboolean headers_done, gpointer user_data);
 
-guint soup_transfer_read  (GIOChannel             *chan,
-			   gboolean                overwrite_chunks,
-			   SoupReadHeadersDoneFn   headers_done_cb,
-			   SoupReadChunkFn         read_chunk_cb,
-			   SoupReadDoneFn          read_done_cb,
-			   SoupReadErrorFn         error_cb,
-			   gpointer                user_data);
+gpointer soup_transfer_read  (GIOChannel             *chan,
+			      gboolean                overwrite_chunks,
+			      SoupReadHeadersDoneFn   headers_done_cb,
+			      SoupReadChunkFn         read_chunk_cb,
+			      SoupReadDoneFn          read_done_cb,
+			      SoupReadErrorFn         error_cb,
+			      gpointer                user_data);
 
-void  soup_transfer_read_cancel (guint tag);
+void  soup_transfer_read_cancel (gpointer r);
 
-void  soup_transfer_read_set_callbacks (guint                   tag,
+void  soup_transfer_read_set_callbacks (gpointer                r,
 					SoupReadHeadersDoneFn   headers_done_cb,
 					SoupReadChunkFn         read_chunk_cb,
 					SoupReadDoneFn          read_done_cb,
@@ -62,12 +62,12 @@
 
 typedef void (*SoupWriteErrorFn) (gboolean headers_done, gpointer user_data);
 
-guint soup_transfer_write_simple (GIOChannel             *chan,
-				  GString                *header,
-				  const SoupDataBuffer   *src,
-				  SoupWriteDoneFn         write_done_cb,
-				  SoupWriteErrorFn        error_cb,
-				  gpointer                user_data);
+gpointer soup_transfer_write_simple (GIOChannel             *chan,
+				     GString                *header,
+				     const SoupDataBuffer   *src,
+				     SoupWriteDoneFn         write_done_cb,
+				     SoupWriteErrorFn        error_cb,
+				     gpointer                user_data);
 
 typedef void (*SoupWriteGetHeaderFn) (GString  **out_hdr,
 				      gpointer   user_data);
@@ -75,18 +75,18 @@
 typedef SoupTransferDone (*SoupWriteGetChunkFn) (SoupDataBuffer *out_next,
 						 gpointer        user_data);
 
-guint soup_transfer_write (GIOChannel             *chan,
-			   SoupTransferEncoding    encoding,
-			   SoupWriteGetHeaderFn    get_header_cb,
-			   SoupWriteGetChunkFn     get_chunk_cb,
-			   SoupWriteDoneFn         write_done_cb,
-			   SoupWriteErrorFn        error_cb,
-			   gpointer                user_data);
+gpointer soup_transfer_write (GIOChannel             *chan,
+			      SoupTransferEncoding    encoding,
+			      SoupWriteGetHeaderFn    get_header_cb,
+			      SoupWriteGetChunkFn     get_chunk_cb,
+			      SoupWriteDoneFn         write_done_cb,
+			      SoupWriteErrorFn        error_cb,
+			      gpointer                user_data);
 
-void  soup_transfer_write_pause (guint tag);
+void  soup_transfer_write_pause (gpointer tag);
 
-void  soup_transfer_write_unpause (guint tag);
+void  soup_transfer_write_unpause (gpointer tag);
 
-void  soup_transfer_write_cancel (guint tag);
+void  soup_transfer_write_cancel (gpointer tag);
 
 #endif /*SOUP_TRANSFER_H*/


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