[gmime/gmime-2-4] Constify some strings



commit bec672fd7db9efc577cd0db7365447cd99d4c626
Author: Jeffrey Stedfast <fejj gnome org>
Date:   Mon Sep 13 10:31:50 2010 -0400

    Constify some 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 75b589f..d6a9273 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,11 @@
 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-13  Jeffrey Stedfast  <fejj novell com>
+
 	* README: Bumped version
 
 	* configure.in: Bumped version to 2.4.19
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]