Mercurial > pidgin
diff src/pluginpref.h @ 13106:a0a4b44239e8
[gaim-migrate @ 15468]
I was reading the gettext man page and it pointed out that it should be typed as const char *, but it's char * to avoid warnings in code predating ANSI C. So, for the heck of it, I changed added a cast in internal.h. As it turns out, there was a lot of code that relied on this. In the interest of type safety, I've fixed all the warnings. I feel this improved a number of function signatures (in terms of typing clarity). Flame me if you object.
committer: Tailor Script <tailor@pidgin.im>
author | Richard Laager <rlaager@wiktel.com> |
---|---|
date | Thu, 02 Feb 2006 21:34:43 +0000 |
parents | 8ae981f2c9cb |
children |
line wrap: on
line diff
--- a/src/pluginpref.h Thu Feb 02 20:03:17 2006 +0000 +++ b/src/pluginpref.h Thu Feb 02 21:34:43 2006 +0000 @@ -91,7 +91,7 @@ * @param name The name of the pref * @return a new GaimPluginPref */ -GaimPluginPref *gaim_plugin_pref_new_with_name(char *name); +GaimPluginPref *gaim_plugin_pref_new_with_name(const char *name); /** * Create a new plugin preference with label @@ -99,7 +99,7 @@ * @param label The label to be displayed * @return a new GaimPluginPref */ -GaimPluginPref *gaim_plugin_pref_new_with_label(char *label); +GaimPluginPref *gaim_plugin_pref_new_with_label(const char *label); /** * Create a new plugin preference with name and label @@ -108,7 +108,7 @@ * @param label The label to be displayed * @return a new GaimPluginPref */ -GaimPluginPref *gaim_plugin_pref_new_with_name_and_label(char *name, char *label); +GaimPluginPref *gaim_plugin_pref_new_with_name_and_label(const char *name, const char *label); /** * Destroy a plugin preference @@ -123,7 +123,7 @@ * @param pref The plugin pref * @param name The name of the pref */ -void gaim_plugin_pref_set_name(GaimPluginPref *pref, char *name); +void gaim_plugin_pref_set_name(GaimPluginPref *pref, const char *name); /** * Get a plugin pref name @@ -131,7 +131,7 @@ * @param pref The plugin pref * @return The name of the pref */ -char *gaim_plugin_pref_get_name(GaimPluginPref *pref); +const char *gaim_plugin_pref_get_name(GaimPluginPref *pref); /** * Set a plugin pref label @@ -139,7 +139,7 @@ * @param pref The plugin pref * @param label The label for the plugin pref */ -void gaim_plugin_pref_set_label(GaimPluginPref *pref, char *label); +void gaim_plugin_pref_set_label(GaimPluginPref *pref, const char *label); /** * Get a plugin pref label @@ -147,7 +147,7 @@ * @param pref The plugin pref * @return The label for the plugin pref */ -char *gaim_plugin_pref_get_label(GaimPluginPref *pref); +const char *gaim_plugin_pref_get_label(GaimPluginPref *pref); /** * Set the bounds for an integer pref @@ -190,7 +190,7 @@ * @param label The label for the choice * @param choice A gpointer of the choice */ -void gaim_plugin_pref_add_choice(GaimPluginPref *pref, char *label, gpointer choice); +void gaim_plugin_pref_add_choice(GaimPluginPref *pref, const char *label, gpointer choice); /** * Get the choices for a choices plugin pref