diff options
author | Murray Cumming <murrayc@src.gnome.org> | 2001-04-28 20:28:54 +0000 |
---|---|---|
committer | Murray Cumming <murrayc@src.gnome.org> | 2001-04-28 20:28:54 +0000 |
commit | f276b40eca4206294fb4887b95d3a6c7ffe2daa2 (patch) | |
tree | bd8dde1c0b99d9357cab4631efc7d49abc013853 | |
parent | 53e80a002124dc3f30ceeed6a8c901488b596572 (diff) | |
download | gconf-f276b40eca4206294fb4887b95d3a6c7ffe2daa2.tar.gz |
added const to some function args.GNOME_MEDIA_1_2_2
-rw-r--r-- | ChangeLog | 8 | ||||
-rw-r--r-- | gconf/gconf-client.c | 4 | ||||
-rw-r--r-- | gconf/gconf-client.h | 4 | ||||
-rw-r--r-- | gconf/gconf-schema.c | 4 | ||||
-rw-r--r-- | gconf/gconf-schema.h | 4 | ||||
-rw-r--r-- | gconf/gconf-value.c | 16 | ||||
-rw-r--r-- | gconf/gconf-value.h | 16 | ||||
-rw-r--r-- | gconf/gconf.c | 2 | ||||
-rw-r--r-- | gconf/gconf.h | 2 |
9 files changed, 34 insertions, 26 deletions
@@ -1,3 +1,11 @@ +2001-04-28 Murray Cumming <murrayc@usa.net> + + * gconf/gconf-client.c, gconf/gconf-client.h, + gconf/gconf-schema.c, gconf/gconf-schema.h, + gconf/gconf-value.c, gconf/gconf-value.h, + gconf/gconf.c, gconf/gconf.h: Use of const with function + args. e.g. gconf_value_copy(const GConfValue* src). + 2001-04-17 Michael Meeks <michael@ximian.com> * gconf/Makefile.am (dist-hook): don't distribute built diff --git a/gconf/gconf-client.c b/gconf/gconf-client.c index d9c71567..01f3e257 100644 --- a/gconf/gconf-client.c +++ b/gconf/gconf-client.c @@ -882,7 +882,7 @@ gconf_client_preload (GConfClient* client, void gconf_client_set (GConfClient* client, const gchar* key, - GConfValue* val, + const GConfValue* val, GError** err) { GError* error = NULL; @@ -1582,7 +1582,7 @@ gconf_client_set_bool (GConfClient* client, const gchar* key, gboolean gconf_client_set_schema (GConfClient* client, const gchar* key, - GConfSchema* val, GError** err) + const GConfSchema* val, GError** err) { GError* error = NULL; diff --git a/gconf/gconf-client.h b/gconf/gconf-client.h index c4eca269..e23f3214 100644 --- a/gconf/gconf-client.h +++ b/gconf/gconf-client.h @@ -224,7 +224,7 @@ void gconf_client_preload (GConfClient* client, void gconf_client_set (GConfClient* client, const gchar* key, - GConfValue* val, + const GConfValue* val, GError** err); GConfValue* gconf_client_get (GConfClient* client, @@ -314,7 +314,7 @@ gboolean gconf_client_set_bool (GConfClient* client, const gchar* key, gboolean val, GError** err); gboolean gconf_client_set_schema (GConfClient* client, const gchar* key, - GConfSchema* val, GError** err); + const GConfSchema* val, GError** err); /* List should be the same as the one gconf_client_get_list() would return */ gboolean gconf_client_set_list (GConfClient* client, const gchar* key, diff --git a/gconf/gconf-schema.c b/gconf/gconf-schema.c index de42f1c5..1ad2223a 100644 --- a/gconf/gconf-schema.c +++ b/gconf/gconf-schema.c @@ -57,7 +57,7 @@ gconf_schema_free(GConfSchema* sc) } GConfSchema* -gconf_schema_copy(GConfSchema* sc) +gconf_schema_copy(const GConfSchema* sc) { GConfSchema* dest; @@ -154,7 +154,7 @@ gconf_schema_set_owner(GConfSchema* sc, const gchar* owner) } void -gconf_schema_set_default_value(GConfSchema* sc, GConfValue* val) +gconf_schema_set_default_value(GConfSchema* sc, const GConfValue* val) { if (sc->default_value != NULL) gconf_value_free(sc->default_value); diff --git a/gconf/gconf-schema.h b/gconf/gconf-schema.h index 702d34a2..db472d88 100644 --- a/gconf/gconf-schema.h +++ b/gconf/gconf-schema.h @@ -46,7 +46,7 @@ struct _GConfSchema { GConfSchema* gconf_schema_new (void); void gconf_schema_free (GConfSchema *sc); -GConfSchema* gconf_schema_copy (GConfSchema *sc); +GConfSchema* gconf_schema_copy (const GConfSchema *sc); void gconf_schema_set_type (GConfSchema *sc, GConfValueType type); @@ -65,7 +65,7 @@ void gconf_schema_set_long_desc (GConfSchema *sc, void gconf_schema_set_owner (GConfSchema *sc, const gchar *owner); void gconf_schema_set_default_value (GConfSchema *sc, - GConfValue *val); + const GConfValue *val); void gconf_schema_set_default_value_nocopy (GConfSchema *sc, GConfValue *val); diff --git a/gconf/gconf-value.c b/gconf/gconf-value.c index 8719706b..dbbade2e 100644 --- a/gconf/gconf-value.c +++ b/gconf/gconf-value.c @@ -487,7 +487,7 @@ gconf_value_new_pair_from_string(GConfValueType car_type, } gchar* -gconf_value_to_string(GConfValue* value) +gconf_value_to_string(const GConfValue* value) { /* These strings shouldn't be translated; they're primarily intended for machines to read, not humans, though I do @@ -655,7 +655,7 @@ copy_value_list(GSList* list) } GConfValue* -gconf_value_copy(GConfValue* src) +gconf_value_copy(const GConfValue* src) { GConfValue* dest; @@ -802,7 +802,7 @@ gconf_value_set_bool(GConfValue* value, gboolean the_bool) } void -gconf_value_set_schema(GConfValue* value, GConfSchema* sc) +gconf_value_set_schema(GConfValue* value, const GConfSchema* sc) { g_return_if_fail(value != NULL); g_return_if_fail(value->type == GCONF_VALUE_SCHEMA); @@ -827,7 +827,7 @@ gconf_value_set_schema_nocopy(GConfValue* value, GConfSchema* sc) } void -gconf_value_set_car(GConfValue* value, GConfValue* car) +gconf_value_set_car(GConfValue* value, const GConfValue* car) { gconf_value_set_car_nocopy(value, gconf_value_copy(car)); } @@ -845,7 +845,7 @@ gconf_value_set_car_nocopy(GConfValue* value, GConfValue* car) } void -gconf_value_set_cdr(GConfValue* value, GConfValue* cdr) +gconf_value_set_cdr(GConfValue* value, const GConfValue* cdr) { gconf_value_set_cdr_nocopy(value, gconf_value_copy(cdr)); } @@ -894,7 +894,7 @@ gconf_value_set_list_nocopy(GConfValue* value, void gconf_value_set_list (GConfValue* value, - GSList* list) + const GSList* list) { g_return_if_fail(value != NULL); g_return_if_fail(value->type == GCONF_VALUE_LIST); @@ -958,7 +958,7 @@ gconf_meta_info_set_mod_time(GConfMetaInfo* gcmi, GConfEntry* gconf_entry_new (const gchar *key, - GConfValue *val) + const GConfValue *val) { return gconf_entry_new_nocopy (g_strdup (key), val ? gconf_value_copy (val) : NULL); @@ -1000,7 +1000,7 @@ gconf_entry_steal_value (GConfEntry* entry) void gconf_entry_set_value (GConfEntry *entry, - GConfValue *val) + const GConfValue *val) { gconf_entry_set_value_nocopy (entry, val ? gconf_value_copy (val) : NULL); diff --git a/gconf/gconf-value.h b/gconf/gconf-value.h index dad17e37..eeb104dd 100644 --- a/gconf/gconf-value.h +++ b/gconf/gconf-value.h @@ -84,7 +84,7 @@ struct _GConfValue { GConfValue* gconf_value_new (GConfValueType type); -GConfValue* gconf_value_copy (GConfValue* src); +GConfValue* gconf_value_copy (const GConfValue* src); void gconf_value_free (GConfValue* value); void gconf_value_set_int (GConfValue* value, @@ -96,15 +96,15 @@ void gconf_value_set_float (GConfValue* value, void gconf_value_set_bool (GConfValue* value, gboolean the_bool); void gconf_value_set_schema (GConfValue* value, - GConfSchema* sc); + const GConfSchema* sc); void gconf_value_set_schema_nocopy (GConfValue* value, GConfSchema* sc); void gconf_value_set_car (GConfValue* value, - GConfValue* car); + const GConfValue* car); void gconf_value_set_car_nocopy (GConfValue* value, GConfValue* car); void gconf_value_set_cdr (GConfValue* value, - GConfValue* cdr); + const GConfValue* cdr); void gconf_value_set_cdr_nocopy (GConfValue* value, GConfValue* cdr); /* Set a list of GConfValue, NOT lists or pairs */ @@ -113,9 +113,9 @@ void gconf_value_set_list_type (GConfValue* value, void gconf_value_set_list_nocopy (GConfValue* value, GSList* list); void gconf_value_set_list (GConfValue* value, - GSList* list); + const GSList* list); -gchar* gconf_value_to_string (GConfValue* value); +gchar* gconf_value_to_string (const GConfValue* value); /* Meta-information about a key. Not the same as a schema; this is * information stored on the key, the schema is a specification @@ -165,7 +165,7 @@ struct _GConfEntry { #define gconf_entry_get_is_writable(x) ((x)->is_writable) GConfEntry* gconf_entry_new (const gchar *key, - GConfValue *val); + const GConfValue *val); GConfEntry* gconf_entry_new_nocopy (gchar *key, GConfValue *val); void gconf_entry_free (GConfEntry *entry); @@ -173,7 +173,7 @@ void gconf_entry_free (GConfEntry *entry); /* Transfer ownership of value to the caller. */ GConfValue* gconf_entry_steal_value (GConfEntry *entry); void gconf_entry_set_value (GConfEntry *entry, - GConfValue *val); + const GConfValue *val); void gconf_entry_set_value_nocopy (GConfEntry *entry, GConfValue *val); void gconf_entry_set_schema_name (GConfEntry *entry, diff --git a/gconf/gconf.c b/gconf/gconf.c index 3a13bb49..2e011d43 100644 --- a/gconf/gconf.c +++ b/gconf/gconf.c @@ -2842,7 +2842,7 @@ gconf_engine_set_bool (GConfEngine* conf, const gchar* key, gboolean gconf_engine_set_schema (GConfEngine* conf, const gchar* key, - GConfSchema* val, GError** err) + const GConfSchema* val, GError** err) { GConfValue* gval; diff --git a/gconf/gconf.h b/gconf/gconf.h index a0397713..917029bb 100644 --- a/gconf/gconf.h +++ b/gconf/gconf.h @@ -222,7 +222,7 @@ gboolean gconf_engine_set_bool (GConfEngine *conf, GError **err); gboolean gconf_engine_set_schema (GConfEngine *conf, const gchar *key, - GConfSchema *val, + const GConfSchema *val, GError **err); |