libsoup r1118 - in trunk: . libsoup
- From: danw svn gnome org
- To: svn-commits-list gnome org
- Subject: libsoup r1118 - in trunk: . libsoup
- Date: Sat, 29 Mar 2008 19:51:05 +0000 (GMT)
Author: danw
Date: Sat Mar 29 19:51:05 2008
New Revision: 1118
URL: http://svn.gnome.org/viewvc/libsoup?rev=1118&view=rev
Log:
* libsoup/soup-message.h (SoupMessage): de-constify
msg->reason_phrase; it's no more const than any other struct
field.
* libsoup/soup-message.c (finalize)
(soup_message_cleanup_response, soup_message_set_status)
(soup_message_set_status_full): don't need to cast reason_phase to
non-const when freeing it now
* libsoup/soup-message-client-io.c (parse_response_headers):
Likewise, remove reason-phrase non-const casts
Modified:
trunk/ChangeLog
trunk/libsoup/soup-message-client-io.c
trunk/libsoup/soup-message.c
trunk/libsoup/soup-message.h
Modified: trunk/libsoup/soup-message-client-io.c
==============================================================================
--- trunk/libsoup/soup-message-client-io.c (original)
+++ trunk/libsoup/soup-message-client-io.c Sat Mar 29 19:51:05 2008
@@ -26,13 +26,13 @@
SoupMessagePrivate *priv = SOUP_MESSAGE_GET_PRIVATE (req);
SoupHTTPVersion version;
- g_free((char*)req->reason_phrase);
+ g_free(req->reason_phrase);
req->reason_phrase = NULL;
if (!soup_headers_parse_response (headers, headers_len,
req->response_headers,
&version,
&req->status_code,
- (char **) &req->reason_phrase))
+ &req->reason_phrase))
return SOUP_STATUS_MALFORMED;
g_object_notify (G_OBJECT (req), SOUP_MESSAGE_STATUS_CODE);
Modified: trunk/libsoup/soup-message.c
==============================================================================
--- trunk/libsoup/soup-message.c (original)
+++ trunk/libsoup/soup-message.c Sat Mar 29 19:51:05 2008
@@ -149,7 +149,7 @@
soup_message_body_free (msg->response_body);
soup_message_headers_free (msg->response_headers);
- g_free ((char *) msg->reason_phrase);
+ g_free (msg->reason_phrase);
G_OBJECT_CLASS (soup_message_parent_class)->finalize (object);
}
@@ -1039,7 +1039,7 @@
req->status_code = SOUP_STATUS_NONE;
if (req->reason_phrase) {
- g_free ((char *) req->reason_phrase);
+ g_free (req->reason_phrase);
req->reason_phrase = NULL;
}
priv->http_version = priv->orig_http_version;
@@ -1246,7 +1246,7 @@
g_return_if_fail (SOUP_IS_MESSAGE (msg));
g_return_if_fail (status_code != 0);
- g_free ((char *) msg->reason_phrase);
+ g_free (msg->reason_phrase);
msg->status_code = status_code;
msg->reason_phrase = g_strdup (soup_status_get_phrase (status_code));
@@ -1271,7 +1271,7 @@
g_return_if_fail (status_code != 0);
g_return_if_fail (reason_phrase != NULL);
- g_free ((char *) msg->reason_phrase);
+ g_free (msg->reason_phrase);
msg->status_code = status_code;
msg->reason_phrase = g_strdup (reason_phrase);
Modified: trunk/libsoup/soup-message.h
==============================================================================
--- trunk/libsoup/soup-message.h (original)
+++ trunk/libsoup/soup-message.h Sat Mar 29 19:51:05 2008
@@ -27,7 +27,7 @@
const char *method;
guint status_code;
- const char *reason_phrase;
+ char *reason_phrase;
SoupMessageBody *request_body;
SoupMessageHeaders *request_headers;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]