diff options
author | mdankov <mdankov@ffa7fe5e-494d-0410-b361-a75ebd5db220> | 2014-10-29 19:32:53 +0000 |
---|---|---|
committer | mdankov <mdankov@ffa7fe5e-494d-0410-b361-a75ebd5db220> | 2014-10-29 19:32:53 +0000 |
commit | 8057f17aa71014cb6c99bf06b2c1c13ae02dc5ca (patch) | |
tree | bb80c6cfd018102a09889cc40eeaa45c3981198b /navit | |
parent | 3978907726f9c0c6e5bf2924851d039de70d6cb6 (diff) | |
download | navit-8057f17aa71014cb6c99bf06b2c1c13ae02dc5ca.tar.gz |
Fix:map/csv:Do not use g_hash_table_get_values function to keep compatibility with glib 2.0 found on Maemo4 @ N810. Fixes #1263
git-svn-id: http://svn.code.sf.net/p/navit/code/trunk/navit@5917 ffa7fe5e-494d-0410-b361-a75ebd5db220
Diffstat (limited to 'navit')
-rw-r--r-- | navit/map/csv/csv.c | 31 |
1 files changed, 15 insertions, 16 deletions
diff --git a/navit/map/csv/csv.c b/navit/map/csv/csv.c index 8ac279321..e8d7a9879 100644 --- a/navit/map/csv/csv.c +++ b/navit/map/csv/csv.c @@ -489,29 +489,28 @@ static void quadtree_item_free_do(void *data) g_free(data); } +static void map_csv_debug_dump_hash_item(gpointer key, gpointer value, gpointer user_data) +{ + struct quadtree_item *qi=value; + GList *attrs; + dbg(3,"%p del=%d ref=%d\n", qi,qi->deleted, qi->ref_count); + attrs=((struct quadtree_data *)qi->data)->attr_list; + while(attrs) { + if(((struct attr*)attrs->data)->type==attr_label) + dbg(3,"... %s\n",((struct attr*)attrs->data)->u.str); + attrs=g_list_next(attrs); + } +} + /** * Dump all map data (including deleted items) to the log. */ static void map_csv_debug_dump(struct map_priv *map) { - GList *l=g_hash_table_get_values(map->qitem_hash); - GList *ll=l; - while(ll) { - struct quadtree_item *qi; - GList *attrs; - qi=ll->data; - dbg(0,"%p del=%d ref=%d\n", qi,qi->deleted, qi->ref_count); - attrs=((struct quadtree_data *)qi->data)->attr_list; - while(attrs) { - if(((struct attr*)attrs->data)->type==attr_label) - dbg(0,"... %s\n",((struct attr*)attrs->data)->u.str); - attrs=g_list_next(attrs); - } - ll=g_list_next(ll); - } - g_list_free(l); + g_hash_table_foreach(map->qitem_hash, map_csv_debug_dump_hash_item, NULL); } + static struct map_rect_priv * map_rect_new_csv(struct map_priv *map, struct map_selection *sel) { |