Re: [evolution-patches] Re: [Soup-list] [PATCH] soup: union initialization should use named initializers (#32833)
- From: Dan Winship <danw ximian com>
- To: Jeremy Katz <katzj redhat com>
- Cc: evolution-patches ximian com
- Subject: Re: [evolution-patches] Re: [Soup-list] [PATCH] soup: union initialization should use named initializers (#32833)
- Date: 06 May 2003 09:02:59 -0400
On Mon, 2003-05-05 at 17:08, Jeremy Katz wrote:
> This looked sane but never actually appears to have been ported to
> libsoup (or actually looking, committed to the old soup branch either --
> I just never noticed because I still had my C99 changes there). Any
> chance of getting it applied?
committed
> On Fri, 2002-10-25 at 10:32, Dan Winship wrote:
> > On Thu, 2002-10-24 at 15:39, Jeremy Katz wrote:
> > > soup does a cast from char * to a gint in a union initialization which
> > > won't work for 64-bit platforms. This patch changes to using named
> > > initializers for the union.
> >
> > Here's a counterproposal that should fix the problem without introducing
> > a C99 dependency. Alex/Joe, can you verify that this is sane?
> >
> > -- Dan
> >
> >
> >
> > ______________________________________________________________________
> > Index: ChangeLog
> > ===================================================================
> > RCS file: /cvs/gnome/soup/ChangeLog,v
> > retrieving revision 1.229.2.40.2.51
> > diff -u -w -r1.229.2.40.2.51 ChangeLog
> > --- ChangeLog 16 Oct 2002 19:44:35 -0000 1.229.2.40.2.51
> > +++ ChangeLog 25 Oct 2002 14:24:15 -0000
> > @@ -1,3 +1,12 @@
> > +2002-10-25 Dan Winship <danw ximian com>
> > +
> > + * src/libsoup/soup-message.c (global_handlers): Change the
> > + redirect handler to be a RESPONSE_ERROR_CLASS_HANDLER for
> > + SOUP_ERROR_CLASS_REDIRECT rather than a RESPONSE_HEADER_HANDLER
> > + for "Location" to get around the non-64-bit-clean union
> > + initialization pointed out by Jeremy Katz <katzj redhat com>.
> > + (redirect_handler): Update for that.
> > +
> > 2002-10-16 Joe Shaw <joe ximian com>
> >
> > * src/libsoup/soup-misc.c: Don't set SSL environment variables,
> > Index: src/libsoup/soup-message.c
> > ===================================================================
> > RCS file: /cvs/gnome/soup/src/libsoup/soup-message.c,v
> > retrieving revision 1.46.2.12.2.11
> > diff -u -w -r1.46.2.12.2.11 soup-message.c
> > --- src/libsoup/soup-message.c 4 Oct 2002 03:35:19 -0000 1.46.2.12.2.11
> > +++ src/libsoup/soup-message.c 25 Oct 2002 14:24:17 -0000
> > @@ -931,17 +931,17 @@
> > redirect_handler (SoupMessage *msg, gpointer user_data)
> > {
> > const gchar *new_loc;
> > -
> > - if (msg->errorclass != SOUP_ERROR_CLASS_REDIRECT ||
> > - msg->priv->msg_flags & SOUP_MESSAGE_NO_REDIRECT) return;
> > -
> > - new_loc = soup_message_get_header (msg->response_headers, "Location");
> > -
> > - if (new_loc) {
> > const SoupUri *old_uri;
> > SoupUri *new_uri;
> > SoupContext *new_ctx;
> >
> > + if (msg->priv->msg_flags & SOUP_MESSAGE_NO_REDIRECT)
> > + return;
> > +
> > + new_loc = soup_message_get_header (msg->response_headers, "Location");
> > + if (!new_loc)
> > + return;
> > +
> > old_uri = soup_context_get_uri (msg->context);
> >
> > new_uri = soup_uri_new (new_loc);
> > @@ -968,8 +968,6 @@
> > soup_context_unref (new_ctx);
> >
> > soup_message_requeue (msg);
> > - }
> > -
> > return;
> >
> > INVALID_REDIRECT:
> > @@ -999,14 +997,14 @@
> >
> > static SoupHandlerData global_handlers [] = {
> > /*
> > - * Handle redirect response codes 300, 301, 302, 303, and 305.
> > + * Handle redirect response codes.
> > */
> > {
> > SOUP_HANDLER_PRE_BODY,
> > redirect_handler,
> > NULL,
> > - RESPONSE_HEADER_HANDLER,
> > - { (guint) "Location" }
> > + RESPONSE_ERROR_CLASS_HANDLER,
> > + { SOUP_ERROR_CLASS_REDIRECT }
> > },
> > /*
> > * Handle authorization.
>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]