[gnome-utils] Remove G_CONST_RETURN usage
- From: Emmanuele Bassi <ebassi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-utils] Remove G_CONST_RETURN usage
- Date: Thu, 9 Jun 2011 16:22:48 +0000 (UTC)
commit e6a0cc89b34786ac4e0e48c59c64178afc26efa1
Author: Emmanuele Bassi <ebassi linux intel com>
Date: Thu Jun 9 17:17:54 2011 +0100
Remove G_CONST_RETURN usage
See GLib bug:
https://bugzilla.gnome.org/show_bug.cgi?id=644611
The macro is going to be deprecated soon.
gnome-dictionary/libgdict/gdict-client-context.c | 4 ++--
gnome-dictionary/libgdict/gdict-client-context.h | 4 ++--
gnome-dictionary/libgdict/gdict-context.c | 18 +++++++++---------
gnome-dictionary/libgdict/gdict-context.h | 18 +++++++++---------
gnome-dictionary/libgdict/gdict-defbox.c | 6 +++---
gnome-dictionary/libgdict/gdict-defbox.h | 6 +++---
gnome-dictionary/libgdict/gdict-source-loader.c | 4 ++--
gnome-dictionary/libgdict/gdict-source-loader.h | 4 ++--
gnome-dictionary/libgdict/gdict-source.c | 8 ++++----
gnome-dictionary/libgdict/gdict-source.h | 8 ++++----
gnome-dictionary/libgdict/gdict-speller.c | 4 ++--
gnome-dictionary/libgdict/gdict-speller.h | 4 ++--
gnome-dictionary/src/gdict-sidebar.c | 2 +-
gnome-dictionary/src/gdict-sidebar.h | 2 +-
14 files changed, 46 insertions(+), 46 deletions(-)
---
diff --git a/gnome-dictionary/libgdict/gdict-client-context.c b/gnome-dictionary/libgdict/gdict-client-context.c
index 316e73a..3842e5e 100644
--- a/gnome-dictionary/libgdict/gdict-client-context.c
+++ b/gnome-dictionary/libgdict/gdict-client-context.c
@@ -555,7 +555,7 @@ gdict_client_context_set_hostname (GdictClientContext *context,
* owned by the #GdictClientContext object and should never be modified or
* freed.
*/
-G_CONST_RETURN gchar *
+const gchar *
gdict_client_context_get_hostname (GdictClientContext *context)
{
gchar *hostname;
@@ -636,7 +636,7 @@ gdict_client_context_set_client (GdictClientContext *context,
* Return value: the client name. The returned string is owned by the
* #GdictClientContext object and should never be modified or freed.
*/
-G_CONST_RETURN gchar *
+const gchar *
gdict_client_context_get_client (GdictClientContext *context)
{
gchar *client_name;
diff --git a/gnome-dictionary/libgdict/gdict-client-context.h b/gnome-dictionary/libgdict/gdict-client-context.h
index 7c26ed4..8c01d49 100644
--- a/gnome-dictionary/libgdict/gdict-client-context.h
+++ b/gnome-dictionary/libgdict/gdict-client-context.h
@@ -87,12 +87,12 @@ GdictContext * gdict_client_context_new (const gchar *hos
void gdict_client_context_set_hostname (GdictClientContext *context,
const gchar *hostname);
-G_CONST_RETURN gchar *gdict_client_context_get_hostname (GdictClientContext *context);
+const gchar * gdict_client_context_get_hostname (GdictClientContext *context);
void gdict_client_context_set_port (GdictClientContext *context,
gint port);
guint gdict_client_context_get_port (GdictClientContext *context);
void gdict_client_context_set_client (GdictClientContext *context,
const gchar *client);
-G_CONST_RETURN gchar *gdict_client_context_get_client (GdictClientContext *context);
+const gchar * gdict_client_context_get_client (GdictClientContext *context);
#endif /* __GDICT_CLIENT_CONTEXT_H__ */
diff --git a/gnome-dictionary/libgdict/gdict-context.c b/gnome-dictionary/libgdict/gdict-context.c
index 1580157..07cefd2 100644
--- a/gnome-dictionary/libgdict/gdict-context.c
+++ b/gnome-dictionary/libgdict/gdict-context.c
@@ -494,7 +494,7 @@ gdict_database_unref (GdictDatabase *db)
*
* Since: 1.0
*/
-G_CONST_RETURN gchar *
+const gchar *
gdict_database_get_name (GdictDatabase *db)
{
g_return_val_if_fail (db != NULL, NULL);
@@ -513,7 +513,7 @@ gdict_database_get_name (GdictDatabase *db)
*
* Since: 1.0
*/
-G_CONST_RETURN gchar *
+const gchar *
gdict_database_get_full_name (GdictDatabase *db)
{
g_return_val_if_fail (db != NULL, NULL);
@@ -603,7 +603,7 @@ gdict_strategy_unref (GdictStrategy *strat)
*
* Since: 1.0
*/
-G_CONST_RETURN gchar *
+const gchar *
gdict_strategy_get_name (GdictStrategy *strat)
{
g_return_val_if_fail (strat != NULL, NULL);
@@ -621,7 +621,7 @@ gdict_strategy_get_name (GdictStrategy *strat)
*
* Since: 1.0
*/
-G_CONST_RETURN gchar *
+const gchar *
gdict_strategy_get_description (GdictStrategy *strat)
{
g_return_val_if_fail (strat != NULL, NULL);
@@ -710,7 +710,7 @@ gdict_match_unref (GdictMatch *match)
*
* Since: 1.0
*/
-G_CONST_RETURN gchar *
+const gchar *
gdict_match_get_word (GdictMatch *match)
{
g_return_val_if_fail (match != NULL, NULL);
@@ -728,7 +728,7 @@ gdict_match_get_word (GdictMatch *match)
*
* Since: 1.0
*/
-G_CONST_RETURN gchar *
+const gchar *
gdict_match_get_database (GdictMatch *match)
{
g_return_val_if_fail (match != NULL, NULL);
@@ -842,7 +842,7 @@ gdict_definition_get_total (GdictDefinition *def)
*
* Since: 1.0
*/
-G_CONST_RETURN gchar *
+const gchar *
gdict_definition_get_word (GdictDefinition *def)
{
g_return_val_if_fail (def != NULL, NULL);
@@ -863,7 +863,7 @@ gdict_definition_get_word (GdictDefinition *def)
*
* Since: 1.0
*/
-G_CONST_RETURN gchar *
+const gchar *
gdict_definition_get_database (GdictDefinition *def)
{
g_return_val_if_fail (def != NULL, NULL);
@@ -883,7 +883,7 @@ gdict_definition_get_database (GdictDefinition *def)
*
* Since: 1.0
*/
-G_CONST_RETURN gchar *
+const gchar *
gdict_definition_get_text (GdictDefinition *def)
{
g_return_val_if_fail (def != NULL, NULL);
diff --git a/gnome-dictionary/libgdict/gdict-context.h b/gnome-dictionary/libgdict/gdict-context.h
index f60fb4c..369d353 100644
--- a/gnome-dictionary/libgdict/gdict-context.h
+++ b/gnome-dictionary/libgdict/gdict-context.h
@@ -82,8 +82,8 @@ GQuark gdict_context_error_quark (void);
GType gdict_database_get_type (void) G_GNUC_CONST;
GdictDatabase * gdict_database_ref (GdictDatabase *db);
void gdict_database_unref (GdictDatabase *db);
-G_CONST_RETURN gchar *gdict_database_get_name (GdictDatabase *db);
-G_CONST_RETURN gchar *gdict_database_get_full_name (GdictDatabase *db);
+const gchar * gdict_database_get_name (GdictDatabase *db);
+const gchar * gdict_database_get_full_name (GdictDatabase *db);
/**
* GdictStrategy:
@@ -97,8 +97,8 @@ G_CONST_RETURN gchar *gdict_database_get_full_name (GdictDatabase *db);
GType gdict_strategy_get_type (void) G_GNUC_CONST;
GdictStrategy * gdict_strategy_ref (GdictStrategy *strat);
void gdict_strategy_unref (GdictStrategy *strat);
-G_CONST_RETURN gchar *gdict_strategy_get_name (GdictStrategy *strat);
-G_CONST_RETURN gchar *gdict_strategy_get_description (GdictStrategy *strat);
+const gchar * gdict_strategy_get_name (GdictStrategy *strat);
+const gchar * gdict_strategy_get_description (GdictStrategy *strat);
/**
* GdictMatch:
@@ -111,8 +111,8 @@ G_CONST_RETURN gchar *gdict_strategy_get_description (GdictStrategy *strat);
GType gdict_match_get_type (void) G_GNUC_CONST;
GdictMatch * gdict_match_ref (GdictMatch *match);
void gdict_match_unref (GdictMatch *match);
-G_CONST_RETURN gchar *gdict_match_get_word (GdictMatch *match);
-G_CONST_RETURN gchar *gdict_match_get_database (GdictMatch *match);
+const gchar * gdict_match_get_word (GdictMatch *match);
+const gchar * gdict_match_get_database (GdictMatch *match);
/**
* GdictDefinition:
@@ -127,9 +127,9 @@ GType gdict_definition_get_type (void) G_GNUC_CONST;
GdictDefinition * gdict_definition_ref (GdictDefinition *def);
void gdict_definition_unref (GdictDefinition *def);
gint gdict_definition_get_total (GdictDefinition *def);
-G_CONST_RETURN gchar *gdict_definition_get_word (GdictDefinition *def);
-G_CONST_RETURN gchar *gdict_definition_get_database (GdictDefinition *def);
-G_CONST_RETURN gchar *gdict_definition_get_text (GdictDefinition *def);
+const gchar * gdict_definition_get_word (GdictDefinition *def);
+const gchar * gdict_definition_get_database (GdictDefinition *def);
+const gchar * gdict_definition_get_text (GdictDefinition *def);
/**
* GdictContextIface:
diff --git a/gnome-dictionary/libgdict/gdict-defbox.c b/gnome-dictionary/libgdict/gdict-defbox.c
index ec5edc5..93223b1 100644
--- a/gnome-dictionary/libgdict/gdict-defbox.c
+++ b/gnome-dictionary/libgdict/gdict-defbox.c
@@ -2033,7 +2033,7 @@ gdict_defbox_set_database (GdictDefbox *defbox,
*
* Since: 0.1
*/
-G_CONST_RETURN gchar *
+const gchar *
gdict_defbox_get_database (GdictDefbox *defbox)
{
g_return_val_if_fail (GDICT_IS_DEFBOX (defbox), NULL);
@@ -2053,7 +2053,7 @@ gdict_defbox_get_database (GdictDefbox *defbox)
*
* Since: 0.12
*/
-G_CONST_RETURN gchar *
+const gchar *
gdict_defbox_get_word (GdictDefbox *defbox)
{
g_return_val_if_fail (GDICT_IS_DEFBOX (defbox), NULL);
@@ -2863,7 +2863,7 @@ gdict_defbox_set_font_name (GdictDefbox *defbox,
*
* Since: 0.3
*/
-G_CONST_RETURN gchar *
+const gchar *
gdict_defbox_get_font_name (GdictDefbox *defbox)
{
g_return_val_if_fail (GDICT_IS_DEFBOX (defbox), NULL);
diff --git a/gnome-dictionary/libgdict/gdict-defbox.h b/gnome-dictionary/libgdict/gdict-defbox.h
index 327ec3e..dee6520 100644
--- a/gnome-dictionary/libgdict/gdict-defbox.h
+++ b/gnome-dictionary/libgdict/gdict-defbox.h
@@ -74,8 +74,8 @@ void gdict_defbox_set_context (GdictDefbox *defbox,
GdictContext * gdict_defbox_get_context (GdictDefbox *defbox);
void gdict_defbox_set_database (GdictDefbox *defbox,
const gchar *database);
-G_CONST_RETURN gchar *gdict_defbox_get_database (GdictDefbox *defbox);
-G_CONST_RETURN gchar *gdict_defbox_get_word (GdictDefbox *defbox);
+const gchar * gdict_defbox_get_database (GdictDefbox *defbox);
+const gchar * gdict_defbox_get_word (GdictDefbox *defbox);
gchar * gdict_defbox_get_text (GdictDefbox *defbox,
gsize *length) G_GNUC_MALLOC;
void gdict_defbox_select_all (GdictDefbox *defbox);
@@ -94,7 +94,7 @@ void gdict_defbox_find_next (GdictDefbox *defbox);
void gdict_defbox_find_previous (GdictDefbox *defbox);
void gdict_defbox_set_font_name (GdictDefbox *defbox,
const gchar *font_name);
-G_CONST_RETURN gchar *gdict_defbox_get_font_name (GdictDefbox *defbox);
+const gchar * gdict_defbox_get_font_name (GdictDefbox *defbox);
gchar * gdict_defbox_get_selected_word (GdictDefbox *defbox) G_GNUC_MALLOC;
G_END_DECLS
diff --git a/gnome-dictionary/libgdict/gdict-source-loader.c b/gnome-dictionary/libgdict/gdict-source-loader.c
index 75f63a5..df837d1 100644
--- a/gnome-dictionary/libgdict/gdict-source-loader.c
+++ b/gnome-dictionary/libgdict/gdict-source-loader.c
@@ -301,7 +301,7 @@ gdict_source_loader_add_search_path (GdictSourceLoader *loader,
*
* Since: 1.0
*/
-G_CONST_RETURN GSList *
+const GSList *
gdict_source_loader_get_paths (GdictSourceLoader *loader)
{
g_return_val_if_fail (GDICT_IS_SOURCE_LOADER (loader), NULL);
@@ -470,7 +470,7 @@ gdict_source_loader_get_names (GdictSourceLoader *loader,
*
* Since: 1.0
*/
-G_CONST_RETURN GSList *
+const GSList *
gdict_source_loader_get_sources (GdictSourceLoader *loader)
{
g_return_val_if_fail (GDICT_IS_SOURCE_LOADER (loader), NULL);
diff --git a/gnome-dictionary/libgdict/gdict-source-loader.h b/gnome-dictionary/libgdict/gdict-source-loader.h
index 6d871ea..b20d281 100644
--- a/gnome-dictionary/libgdict/gdict-source-loader.h
+++ b/gnome-dictionary/libgdict/gdict-source-loader.h
@@ -65,10 +65,10 @@ GdictSourceLoader * gdict_source_loader_new (void);
void gdict_source_loader_update (GdictSourceLoader *loader);
void gdict_source_loader_add_search_path (GdictSourceLoader *loader,
const gchar *path);
-G_CONST_RETURN GSList *gdict_source_loader_get_paths (GdictSourceLoader *loader);
+const GSList * gdict_source_loader_get_paths (GdictSourceLoader *loader);
gchar ** gdict_source_loader_get_names (GdictSourceLoader *loader,
gsize *length) G_GNUC_MALLOC;
-G_CONST_RETURN GSList *gdict_source_loader_get_sources (GdictSourceLoader *loader);
+const GSList * gdict_source_loader_get_sources (GdictSourceLoader *loader);
GdictSource * gdict_source_loader_get_source (GdictSourceLoader *loader,
const gchar *name);
gboolean gdict_source_loader_has_source (GdictSourceLoader *loader,
diff --git a/gnome-dictionary/libgdict/gdict-source.c b/gnome-dictionary/libgdict/gdict-source.c
index d2d43ab..e679955 100644
--- a/gnome-dictionary/libgdict/gdict-source.c
+++ b/gnome-dictionary/libgdict/gdict-source.c
@@ -807,7 +807,7 @@ gdict_source_set_name (GdictSource *source,
*
* Since: 1.0
*/
-G_CONST_RETURN gchar *
+const gchar *
gdict_source_get_name (GdictSource *source)
{
g_return_val_if_fail (GDICT_IS_SOURCE (source), NULL);
@@ -869,7 +869,7 @@ gdict_source_set_description (GdictSource *source,
*
* Since: 1.0
*/
-G_CONST_RETURN gchar *
+const gchar *
gdict_source_get_description (GdictSource *source)
{
g_return_val_if_fail (GDICT_IS_SOURCE (source), NULL);
@@ -931,7 +931,7 @@ gdict_source_set_database (GdictSource *source,
*
* Since: 1.0
*/
-G_CONST_RETURN gchar *
+const gchar *
gdict_source_get_database (GdictSource *source)
{
g_return_val_if_fail (GDICT_IS_SOURCE (source), NULL);
@@ -993,7 +993,7 @@ gdict_source_set_strategy (GdictSource *source,
*
* Since: 1.0
*/
-G_CONST_RETURN gchar *
+const gchar *
gdict_source_get_strategy (GdictSource *source)
{
g_return_val_if_fail (GDICT_IS_SOURCE (source), NULL);
diff --git a/gnome-dictionary/libgdict/gdict-source.h b/gnome-dictionary/libgdict/gdict-source.h
index 9734bf0..68e05fa 100644
--- a/gnome-dictionary/libgdict/gdict-source.h
+++ b/gnome-dictionary/libgdict/gdict-source.h
@@ -87,16 +87,16 @@ gchar * gdict_source_to_data (GdictSource *sourc
void gdict_source_set_name (GdictSource *source,
const gchar *name);
-G_CONST_RETURN gchar *gdict_source_get_name (GdictSource *source);
+const gchar * gdict_source_get_name (GdictSource *source);
void gdict_source_set_description (GdictSource *source,
const gchar *description);
-G_CONST_RETURN gchar *gdict_source_get_description (GdictSource *source);
+const gchar * gdict_source_get_description (GdictSource *source);
void gdict_source_set_database (GdictSource *source,
const gchar *database);
-G_CONST_RETURN gchar *gdict_source_get_database (GdictSource *source);
+const gchar * gdict_source_get_database (GdictSource *source);
void gdict_source_set_strategy (GdictSource *source,
const gchar *strategy);
-G_CONST_RETURN gchar *gdict_source_get_strategy (GdictSource *source);
+const gchar * gdict_source_get_strategy (GdictSource *source);
void gdict_source_set_transport (GdictSource *source,
GdictSourceTransport transport,
const gchar *first_transport_property,
diff --git a/gnome-dictionary/libgdict/gdict-speller.c b/gnome-dictionary/libgdict/gdict-speller.c
index ebba6eb..ae0e340 100644
--- a/gnome-dictionary/libgdict/gdict-speller.c
+++ b/gnome-dictionary/libgdict/gdict-speller.c
@@ -543,7 +543,7 @@ gdict_speller_set_database (GdictSpeller *speller,
*
* Since: FIXME
*/
-G_CONST_RETURN gchar *
+const gchar *
gdict_speller_get_database (GdictSpeller *speller)
{
g_return_val_if_fail (GDICT_IS_SPELLER (speller), NULL);
@@ -589,7 +589,7 @@ gdict_speller_set_strategy (GdictSpeller *speller,
*
* Since: FIXME
*/
-G_CONST_RETURN gchar *
+const gchar *
gdict_speller_get_strategy (GdictSpeller *speller)
{
g_return_val_if_fail (GDICT_IS_SPELLER (speller), NULL);
diff --git a/gnome-dictionary/libgdict/gdict-speller.h b/gnome-dictionary/libgdict/gdict-speller.h
index 18cb150..46dfab5 100644
--- a/gnome-dictionary/libgdict/gdict-speller.h
+++ b/gnome-dictionary/libgdict/gdict-speller.h
@@ -69,10 +69,10 @@ void gdict_speller_set_context (GdictSpeller *speller,
GdictContext * gdict_speller_get_context (GdictSpeller *speller);
void gdict_speller_set_database (GdictSpeller *speller,
const gchar *database);
-G_CONST_RETURN gchar *gdict_speller_get_database (GdictSpeller *speller);
+const gchar * gdict_speller_get_database (GdictSpeller *speller);
void gdict_speller_set_strategy (GdictSpeller *speller,
const gchar *strategy);
-G_CONST_RETURN gchar *gdict_speller_get_strategy (GdictSpeller *speller);
+const gchar * gdict_speller_get_strategy (GdictSpeller *speller);
void gdict_speller_clear (GdictSpeller *speller);
void gdict_speller_match (GdictSpeller *speller,
diff --git a/gnome-dictionary/src/gdict-sidebar.c b/gnome-dictionary/src/gdict-sidebar.c
index 9f86e69..fbe1b07 100644
--- a/gnome-dictionary/src/gdict-sidebar.c
+++ b/gnome-dictionary/src/gdict-sidebar.c
@@ -524,7 +524,7 @@ gdict_sidebar_view_page (GdictSidebar *sidebar,
gtk_menu_shell_select_item (GTK_MENU_SHELL (priv->menu), page->menu_item);
}
-G_CONST_RETURN gchar *
+const gchar *
gdict_sidebar_current_page (GdictSidebar *sidebar)
{
GdictSidebarPrivate *priv;
diff --git a/gnome-dictionary/src/gdict-sidebar.h b/gnome-dictionary/src/gdict-sidebar.h
index 2a27774..546e21a 100644
--- a/gnome-dictionary/src/gdict-sidebar.h
+++ b/gnome-dictionary/src/gdict-sidebar.h
@@ -68,7 +68,7 @@ void gdict_sidebar_remove_page (GdictSidebar *sidebar,
const gchar *page_id);
void gdict_sidebar_view_page (GdictSidebar *sidebar,
const gchar *page_id);
-G_CONST_RETURN gchar *gdict_sidebar_current_page (GdictSidebar *sidebar);
+const gchar * gdict_sidebar_current_page (GdictSidebar *sidebar);
gchar ** gdict_sidebar_list_pages (GdictSidebar *sidebar,
gsize *length) G_GNUC_MALLOC;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]