Commit 71154cd6 authored by Philip Withnall's avatar Philip Withnall
Browse files

geocode-glib: Add g_autoptr() cleanup functions

This allows us to use GeocodeForward and GeocodeReverse with
g_autoptr().

https://bugzilla.gnome.org/show_bug.cgi?id=756311
parent e4097a7e
......@@ -64,6 +64,8 @@ struct _GeocodeBoundingBoxClass {
GObjectClass parent_class;
};
G_DEFINE_AUTOPTR_CLEANUP_FUNC (GeocodeBoundingBox, g_object_unref)
GeocodeBoundingBox *geocode_bounding_box_new (gdouble top,
gdouble bottom,
gdouble left,
......
......@@ -64,6 +64,8 @@ struct _GeocodeForwardClass {
GObjectClass parent_class;
};
G_DEFINE_AUTOPTR_CLEANUP_FUNC (GeocodeForward, g_object_unref)
GeocodeForward *geocode_forward_new_for_string (const char *str);
GeocodeForward *geocode_forward_new_for_params (GHashTable *params);
guint geocode_forward_get_answer_count (GeocodeForward *forward);
......
......@@ -62,6 +62,8 @@ struct _GeocodeLocationClass {
GObjectClass parent_class;
};
G_DEFINE_AUTOPTR_CLEANUP_FUNC (GeocodeLocation, g_object_unref)
/**
* GeocodeLocationURIScheme:
* @GEOCODE_LOCATION_URI_SCHEME_GEO: The 'geo' URI scheme, RFC 5870
......
......@@ -65,6 +65,8 @@ struct _GeocodePlaceClass {
GObjectClass parent_class;
};
G_DEFINE_AUTOPTR_CLEANUP_FUNC (GeocodePlace, g_object_unref)
/**
* GeocodePlaceType:
* @GEOCODE_PLACE_TYPE_UNKNOWN: Type is unknown for this place.
......
......@@ -63,6 +63,8 @@ struct _GeocodeReverseClass {
GObjectClass parent_class;
};
G_DEFINE_AUTOPTR_CLEANUP_FUNC (GeocodeReverse, g_object_unref)
GeocodeReverse *geocode_reverse_new_for_location (GeocodeLocation *location);
void geocode_reverse_resolve_async (GeocodeReverse *object,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment