[rhythmbox] fix constness of haystack argument to rb_str_in_strv



commit a2ff7d9f9b006e0edbc278ae155de571d26eb241
Author: Jonathan Matthew <jonathan d14n org>
Date:   Sun Aug 29 19:35:32 2010 +1000

    fix constness of haystack argument to rb_str_in_strv

 lib/rb-util.c                     |    2 +-
 lib/rb-util.h                     |    2 +-
 rhythmdb/rhythmdb-import-job.c    |    2 +-
 sources/rb-import-errors-source.c |    2 +-
 4 files changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/lib/rb-util.c b/lib/rb-util.c
index b8a3e3b..dece114 100644
--- a/lib/rb-util.c
+++ b/lib/rb-util.c
@@ -1162,7 +1162,7 @@ rb_value_free (GValue *val)
  * Return value: %TRUE if found
  */
 gboolean
-rb_str_in_strv (const char *needle, char **haystack)
+rb_str_in_strv (const char *needle, const char **haystack)
 {
 	int i;
 
diff --git a/lib/rb-util.h b/lib/rb-util.h
index 86c3715..12601d8 100644
--- a/lib/rb-util.h
+++ b/lib/rb-util.h
@@ -72,7 +72,7 @@ void rb_list_deep_free (GList *list);
 void rb_list_destroy_free (GList *list, GDestroyNotify destroyer);
 void rb_slist_deep_free (GSList *list);
 
-gboolean rb_str_in_strv (const char *needle, char **haystack);
+gboolean rb_str_in_strv (const char *needle, const char **haystack);
 
 GList* rb_collate_hash_table_keys (GHashTable *table);
 GList* rb_collate_hash_table_values (GHashTable *table);
diff --git a/rhythmdb/rhythmdb-import-job.c b/rhythmdb/rhythmdb-import-job.c
index 97bca26..8dc57c8 100644
--- a/rhythmdb/rhythmdb-import-job.c
+++ b/rhythmdb/rhythmdb-import-job.c
@@ -224,7 +224,7 @@ emit_status_changed (RhythmDBImportJob *job)
 				entry = (RhythmDBEntry *)l->data;
 				bits = g_strsplit (rhythmdb_entry_get_string (entry, RHYTHMDB_PROP_COMMENT), "\n", 0);
 				for (j = 0; bits[j] != NULL; j++) {
-					if (rb_str_in_strv (bits[j], details) == FALSE) {
+					if (rb_str_in_strv (bits[j], (const char **)details) == FALSE) {
 						details = g_realloc (details, sizeof (char *) * (i+2));
 						details[i++] = g_strdup (bits[j]);
 						details[i] = NULL;
diff --git a/sources/rb-import-errors-source.c b/sources/rb-import-errors-source.c
index bcebd71..9bc6e1a 100644
--- a/sources/rb-import-errors-source.c
+++ b/sources/rb-import-errors-source.c
@@ -479,7 +479,7 @@ infobar_response_cb (GtkInfoBar *infobar, gint response, RBImportErrorsSource *s
 		bits = g_strsplit (rhythmdb_entry_get_string (entry, RHYTHMDB_PROP_COMMENT), "\n", 0);
 
 		for (j = 0; bits[j] != NULL; j++) {
-			if (rb_str_in_strv (bits[j], details) == FALSE) {
+			if (rb_str_in_strv (bits[j], (const char **)details) == FALSE) {
 				details = g_realloc (details, sizeof (char *) * i+2);
 				details[i++] = g_strdup (bits[j]);
 				details[i] = NULL;



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