[geocode-glib] lib: Add helper to free GeocodeLocation objects
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [geocode-glib] lib: Add helper to free GeocodeLocation objects
- Date: Sun, 25 Nov 2012 02:00:52 +0000 (UTC)
commit db7cc95d248551d3211db15280db13ef593c0d6d
Author: Bastien Nocera <hadess hadess net>
Date: Sun Nov 25 00:11:39 2012 +0100
lib: Add helper to free GeocodeLocation objects
geocode-glib/geocode-glib.symbols | 1 +
geocode-glib/geocode-location.c | 7 ++-----
geocode-glib/geocode-location.h | 2 ++
3 files changed, 5 insertions(+), 5 deletions(-)
---
diff --git a/geocode-glib/geocode-glib.symbols b/geocode-glib/geocode-glib.symbols
index 02ffa60..ef48490 100644
--- a/geocode-glib/geocode-glib.symbols
+++ b/geocode-glib/geocode-glib.symbols
@@ -1,6 +1,7 @@
geocode_location_get_type
geocode_location_new
geocode_location_new_with_description
+geocode_location_free
geocode_forward_get_type
geocode_forward_new_for_string
geocode_forward_new_for_params
diff --git a/geocode-glib/geocode-location.c b/geocode-glib/geocode-location.c
index 41b90d9..96ea31e 100644
--- a/geocode-glib/geocode-location.c
+++ b/geocode-glib/geocode-location.c
@@ -37,12 +37,9 @@ geocode_location_copy (gpointer boxed)
return to;
}
-static void
-geocode_location_free (gpointer boxed)
+void
+geocode_location_free (GeocodeLocation *loc)
{
- GeocodeLocation *loc;
-
- loc = (GeocodeLocation *) boxed;
g_free (loc->description);
g_free (loc);
}
diff --git a/geocode-glib/geocode-location.h b/geocode-glib/geocode-location.h
index 7ffdff4..ebdb6b1 100644
--- a/geocode-glib/geocode-location.h
+++ b/geocode-glib/geocode-location.h
@@ -45,6 +45,8 @@ GeocodeLocation *geocode_location_new_with_description (gdouble latitude,
gdouble longitude,
const char *description);
+void geocode_location_free (GeocodeLocation *loc);
+
G_END_DECLS
#endif /* GEOCODE_LOCATION_H */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]