[geocode-glib] lib: Remove geocode_object_new() from the public API
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [geocode-glib] lib: Remove geocode_object_new() from the public API
- Date: Fri, 19 Oct 2012 17:15:07 +0000 (UTC)
commit 088f31d6c2eab04a2db871d7da2a665b322a9884
Author: Bastien Nocera <hadess hadess net>
Date: Tue Oct 16 12:38:55 2012 +0200
lib: Remove geocode_object_new() from the public API
geocode-glib/geocode-glib.c | 21 +++------------------
geocode-glib/geocode-glib.h | 1 -
geocode-glib/test-gcglib.c | 2 +-
3 files changed, 4 insertions(+), 20 deletions(-)
---
diff --git a/geocode-glib/geocode-glib.c b/geocode-glib/geocode-glib.c
index b8bedec..13154f9 100644
--- a/geocode-glib/geocode-glib.c
+++ b/geocode-glib/geocode-glib.c
@@ -141,21 +141,6 @@ geocode_object_cache_load (GFile *query,
return ret;
}
-/**
- * geocode_object_new:
- *
- * Creates a new #GeocodeObject to perform geocoding with. Use
- * geocode_object_add() to add new parameters, and
- * geocode_object_resolve_async() to perform the resolution.
- *
- * Returns: a new #GeocodeObject. Use g_object_unref() when done.
- **/
-GeocodeObject *
-geocode_object_new (void)
-{
- return g_object_new (GEOCODE_TYPE_OBJECT, NULL);
-}
-
struct {
const char *tp_attr;
const char *gc_attr; /* NULL to ignore */
@@ -202,7 +187,7 @@ geocode_object_new_for_params (GHashTable *params)
return NULL;
}
- object = geocode_object_new ();
+ object = g_object_new (GEOCODE_TYPE_OBJECT, NULL);
for (i = 0; i < G_N_ELEMENTS (attrs_map); i++) {
GValue *value;
@@ -242,7 +227,7 @@ geocode_object_new_for_coords (gdouble latitude,
g_return_val_if_fail (longitude >= -180.0 && longitude <= 180.0, NULL);
g_return_val_if_fail (latitude >= -90.0 && latitude <= 90.0, NULL);
- object = geocode_object_new ();
+ object = g_object_new (GEOCODE_TYPE_OBJECT, NULL);
object->priv->reverse = TRUE;
g_hash_table_insert (object->priv->ht,
@@ -270,7 +255,7 @@ geocode_object_new_for_location (const char *location)
g_return_val_if_fail (location != NULL, NULL);
- object = geocode_object_new ();
+ object = g_object_new (GEOCODE_TYPE_OBJECT, NULL);
geocode_object_add (object, "location", location);
return object;
diff --git a/geocode-glib/geocode-glib.h b/geocode-glib/geocode-glib.h
index 343288e..4e9776c 100644
--- a/geocode-glib/geocode-glib.h
+++ b/geocode-glib/geocode-glib.h
@@ -259,7 +259,6 @@ struct _GeocodeObjectClass {
**/
#define GEOCODE_OBJECT_FIELD_OFFSETLON "offsetlon"
-GeocodeObject *geocode_object_new (void);
GeocodeObject *geocode_object_new_for_params (GHashTable *params);
GeocodeObject *geocode_object_new_for_location (const char *location);
GeocodeObject *geocode_object_new_for_coords (gdouble latitude,
diff --git a/geocode-glib/test-gcglib.c b/geocode-glib/test-gcglib.c
index acf4795..e889ee7 100644
--- a/geocode-glib/test-gcglib.c
+++ b/geocode-glib/test-gcglib.c
@@ -217,7 +217,7 @@ int main (int argc, char **argv)
return g_test_run ();
}
- object = geocode_object_new ();
+ object = g_object_new (GEOCODE_TYPE_OBJECT, NULL);
for (i = 0; params[i] != NULL; i++) {
char **items;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]