[tracker/fix-deprecations: 3/3] WIP



commit 81c73af71f15b58ef1121d12d7c5e553b4e9c5bb
Author: Martyn Russell <martyn lanedo com>
Date:   Fri Sep 27 15:37:24 2013 +0100

    WIP

 src/libtracker-data/tracker-data-update.c |   10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)
---
diff --git a/src/libtracker-data/tracker-data-update.c b/src/libtracker-data/tracker-data-update.c
index abb4cf9..9017989 100644
--- a/src/libtracker-data/tracker-data-update.c
+++ b/src/libtracker-data/tracker-data-update.c
@@ -82,7 +82,7 @@ struct _TrackerDataUpdateBufferResource {
        gint id;
        gboolean create;
        gboolean modified;
-       /* TrackerProperty -> GValueArray */
+       /* TrackerProperty -> GArray */
        GHashTable *predicates;
        /* string -> TrackerDataUpdateBufferTable */
        GHashTable *tables;
@@ -960,7 +960,7 @@ tracker_data_resource_buffer_flush (GError **error)
 #if HAVE_TRACKER_FTS
        if (resource_buffer->fts_updated) {
                TrackerProperty *prop;
-               GValueArray *values;
+               GArray *values;
                gboolean create = resource_buffer->create;
                GPtrArray *properties, *text;
 
@@ -971,8 +971,8 @@ tracker_data_resource_buffer_flush (GError **error)
                                GString *fts;
 
                                fts = g_string_new ("");
-                               for (i = 0; i < values->n_values; i++) {
-                                       GValue *v = values->values + i;
+                               for (i = 0; i < values->len; i++) {
+                                       GValue *v = &g_array_index (values, GValue, i);
                                        g_string_append (fts, g_value_get_string (v));
                                        g_string_append_c (fts, ' ');
                                }
@@ -1372,7 +1372,7 @@ get_property_values (TrackerProperty *property)
 
        multiple_values = tracker_property_get_multiple_values (property);
 
-       old_values = g_array_sized_new (FALSE, TRUE, sizeof (GValue), multiple_values ? 4 : 1);
+       old_values = g_array_sized_new (FALSE, TRUE, sizeof (GValue*), multiple_values ? 4 : 1);
        g_array_set_clear_func (old_values, (GDestroyNotify) g_value_unset);
        g_hash_table_insert (resource_buffer->predicates, g_object_ref (property), old_values);
 


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