aboutsummaryrefslogtreecommitdiffstats
path: root/camel
diff options
context:
space:
mode:
Diffstat (limited to 'camel')
-rw-r--r--camel/ChangeLog7
-rw-r--r--camel/camel-medium.c11
-rw-r--r--camel/camel-medium.h8
3 files changed, 18 insertions, 8 deletions
diff --git a/camel/ChangeLog b/camel/ChangeLog
index bbfeb04372..fff7a3f951 100644
--- a/camel/ChangeLog
+++ b/camel/ChangeLog
@@ -1,3 +1,10 @@
+2000-04-19 Dan Winship <danw@helixcode.com>
+
+ * camel-medium.[ch] (camel_medium_add_header): const poison.
+ (Belatedly goes with my change of 2000-02-23.)
+ (camel_medium_init): Use g_strcase_{hash,equal} on the header
+ array.
+
2000-04-18 Dan Winship <danw@helixcode.com>
* camel-mime-part.c (my_set_input_stream):
diff --git a/camel/camel-medium.c b/camel/camel-medium.c
index 51451d6173..35a6c7e851 100644
--- a/camel/camel-medium.c
+++ b/camel/camel-medium.c
@@ -29,6 +29,7 @@
#include "gmime-content-field.h"
#include "string-utils.h"
#include "gmime-utils.h"
+#include "hash-table-utils.h"
#include "camel-simple-data-wrapper.h"
@@ -37,8 +38,8 @@ static CamelDataWrapperClass *parent_class = NULL;
/* Returns the class for a CamelMedium */
#define CM_CLASS(so) CAMEL_MEDIUM_CLASS (GTK_OBJECT (so)->klass)
-static void add_header (CamelMedium *medium, gchar *header_name,
- gchar *header_value);
+static void add_header (CamelMedium *medium, const gchar *header_name,
+ const gchar *header_value);
static void remove_header (CamelMedium *medium, const gchar *header_name);
static const gchar *get_header (CamelMedium *medium, const gchar *header_name);
@@ -74,7 +75,8 @@ camel_medium_init (gpointer object, gpointer klass)
{
CamelMedium *camel_medium = CAMEL_MEDIUM (object);
- camel_medium->headers = g_hash_table_new (g_str_hash, g_str_equal);
+ camel_medium->headers = g_hash_table_new (g_strcase_hash,
+ g_strcase_equal);
camel_medium->content = NULL;
}
@@ -130,7 +132,8 @@ finalize (GtkObject *object)
static void
-add_header (CamelMedium *medium, gchar *header_name, gchar *header_value)
+add_header (CamelMedium *medium, const gchar *header_name,
+ const gchar *header_value)
{
gpointer old_name;
gpointer old_value;
diff --git a/camel/camel-medium.h b/camel/camel-medium.h
index 0e34f1c2a7..7c85bd2ed7 100644
--- a/camel/camel-medium.h
+++ b/camel/camel-medium.h
@@ -64,8 +64,8 @@ typedef struct {
CamelDataWrapperClass parent_class;
/* Virtual methods */
- void (*add_header) (CamelMedium *medium, gchar *header_name,
- gchar *header_value);
+ void (*add_header) (CamelMedium *medium, const gchar *header_name,
+ const gchar *header_value);
void (*remove_header) (CamelMedium *medium, const gchar *header_name);
const gchar * (*get_header) (CamelMedium *medium,
const gchar *header_name);
@@ -83,8 +83,8 @@ GtkType camel_medium_get_type (void);
/* public methods */
-void camel_medium_add_header (CamelMedium *medium, gchar *header_name,
- gchar *header_value);
+void camel_medium_add_header (CamelMedium *medium, const gchar *header_name,
+ const gchar *header_value);
void camel_medium_remove_header (CamelMedium *medium,
const gchar *header_name);
const gchar *camel_medium_get_header (CamelMedium *medium,