[gmime] Constify private strings



commit b870025e1824ee215ecd24917ef181c699801b84
Author: Jeffrey Stedfast <fejj gnome org>
Date:   Mon Sep 13 10:39:07 2010 -0400

    Constify private strings
    
    2010-09-13  Jeffrey Stedfast  <fejj novell com>
    
    	* gmime/gmime-charset.c: Mark known_iconv_charsets[] as
    	static. Also mark string members of various private structs as
    	const.

 ChangeLog             |    6 ++++++
 gmime/gmime-charset.c |   12 ++++++------
 2 files changed, 12 insertions(+), 6 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index b51ee27..24af91a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2010-09-13  Jeffrey Stedfast  <fejj novell com>
+
+	* gmime/gmime-charset.c: Mark known_iconv_charsets[] as
+	static. Also mark string members of various private structs as
+	const.
+
 2010-09-06  Jeffrey Stedfast  <fejj novell com>
 
 	* configure.ac: Bump glib version requirement for
diff --git a/gmime/gmime-charset.c b/gmime/gmime-charset.c
index 98c7f66..302b351 100644
--- a/gmime/gmime-charset.c
+++ b/gmime/gmime-charset.c
@@ -1,6 +1,6 @@
 /* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
 /*  GMime
- *  Copyright (C) 2000-2009 Jeffrey Stedfast
+ *  Copyright (C) 2000-2010 Jeffrey Stedfast
  *
  *  This library is free software; you can redistribute it and/or
  *  modify it under the terms of the GNU Lesser General Public License
@@ -72,9 +72,9 @@
 /* a useful website on charset alaises:
  * http://www.li18nux.org/subgroups/sa/locnameguide/v1.1draft/CodesetAliasTable-V11.html */
 
-struct {
-	char *charset;
-	char *iconv_name;
+static struct {
+	const char *charset;
+	const char *iconv_name;
 } known_iconv_charsets[] = {
 	/* charset name, iconv-friendly name (sometimes case sensitive) */
 	{ "utf-8",           "UTF-8"      },
@@ -139,8 +139,8 @@ struct {
  * g_mime_charset_iconv_name() so that we don't have to keep track of
  * all the aliases too. */
 static struct {
-	char *charset;
-	char *lang;
+	const char *charset;
+	const char *lang;
 } cjkr_lang_map[] = {
 	{ "Big5",        "zh" },
 	{ "BIG5HKSCS",   "zh" },



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