[gnome-maps/wip/mlundblad/reduce-dup-place-init: 1/4] WIP: osm-object: Add method to get tags
- From: Marcus Lundblad <mlundblad src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-maps/wip/mlundblad/reduce-dup-place-init: 1/4] WIP: osm-object: Add method to get tags
- Date: Sat, 25 Sep 2021 19:24:01 +0000 (UTC)
commit 941e267c532e90aa9578540a988f724adaaaaa35
Author: Marcus Lundblad <ml update uu se>
Date: Tue Sep 21 22:59:14 2021 +0200
WIP: osm-object: Add method to get tags
Add method to get a reference to all OSM
tags as a hash table.
lib/maps-osm-object.c | 9 +++++++++
lib/maps-osm-object.h | 2 ++
2 files changed, 11 insertions(+)
---
diff --git a/lib/maps-osm-object.c b/lib/maps-osm-object.c
index 5a00f0c1..56718985 100644
--- a/lib/maps-osm-object.c
+++ b/lib/maps-osm-object.c
@@ -329,3 +329,12 @@ maps_osm_object_serialize (const MapsOSMObject *object)
return (char *) result;
}
+
+const GHashTable *
+maps_osm_object_get_tags (const MapsOSMObject *object)
+{
+ const MapsOSMObjectPrivate *priv =
+ maps_osm_object_get_instance_private ((MapsOSMObject *) object);
+
+ return priv->tags;
+}
diff --git a/lib/maps-osm-object.h b/lib/maps-osm-object.h
index 6e8f2e3b..941ecbd2 100644
--- a/lib/maps-osm-object.h
+++ b/lib/maps-osm-object.h
@@ -53,4 +53,6 @@ void maps_osm_object_delete_tag (MapsOSMObject *object, const char *key);
char *maps_osm_object_serialize (const MapsOSMObject *object);
+const GHashTable *maps_osm_object_get_tags (const MapsOSMObject *object);
+
#endif //__MAPS_OSM_OBJECT_H__
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]