[Xfce4-commits] <xfce4-panel:devel> Use G_CONST_RETURN instead of const in return values.

Nick Schermer noreply at xfce.org
Sun Jan 3 12:38:05 CET 2010


Updating branch refs/heads/devel
         to cd0f2cae59adb416a4c3c89ca7984fb0c1d2f8ce (commit)
       from 8e531ec79614f3fae93c2b87f292d6d304510500 (commit)

commit cd0f2cae59adb416a4c3c89ca7984fb0c1d2f8ce
Author: Nick Schermer <nick at xfce.org>
Date:   Wed Dec 30 17:46:24 2009 +0100

    Use G_CONST_RETURN instead of const in return values.

 libxfce4panel/libxfce4panel-config.c       |    2 +-
 libxfce4panel/libxfce4panel-config.h.in    |    6 +-
 libxfce4panel/xfce-panel-plugin-provider.c |    2 +-
 libxfce4panel/xfce-panel-plugin-provider.h |   40 ++++++------
 libxfce4panel/xfce-panel-plugin.c          |   10 ++--
 libxfce4panel/xfce-panel-plugin.h          |   87 ++++++++++++++--------------
 6 files changed, 74 insertions(+), 73 deletions(-)

diff --git a/libxfce4panel/libxfce4panel-config.c b/libxfce4panel/libxfce4panel-config.c
index 3d4c6c3..3eb5235 100644
--- a/libxfce4panel/libxfce4panel-config.c
+++ b/libxfce4panel/libxfce4panel-config.c
@@ -113,7 +113,7 @@ const guint libxfce4panel_micro_version = LIBXFCE4PANEL_MICRO_VERSION;
  *          string is owned by the library and must not be freed or
  *          modified by the caller.
  **/
-const gchar *
+G_CONST_RETURN gchar *
 libxfce4panel_check_version (guint required_major,
                              guint required_minor,
                              guint required_micro)
diff --git a/libxfce4panel/libxfce4panel-config.h.in b/libxfce4panel/libxfce4panel-config.h.in
index 001e4e8..ce72a76 100644
--- a/libxfce4panel/libxfce4panel-config.h.in
+++ b/libxfce4panel/libxfce4panel-config.h.in
@@ -80,9 +80,9 @@ extern const guint libxfce4panel_major_version;
 extern const guint libxfce4panel_minor_version;
 extern const guint libxfce4panel_micro_version;
 
-const gchar *libxfce4panel_check_version (guint required_major,
-                                          guint required_minor,
-                                          guint required_micro);
+G_CONST_RETURN gchar *libxfce4panel_check_version (guint required_major,
+                                                   guint required_minor,
+                                                   guint required_micro);
 
 G_END_DECLS
 
diff --git a/libxfce4panel/xfce-panel-plugin-provider.c b/libxfce4panel/xfce-panel-plugin-provider.c
index 90971a2..36757d0 100644
--- a/libxfce4panel/xfce-panel-plugin-provider.c
+++ b/libxfce4panel/xfce-panel-plugin-provider.c
@@ -80,7 +80,7 @@ xfce_panel_plugin_provider_class_init (gpointer klass,
 
 
 
-const gchar *
+G_CONST_RETURN gchar *
 xfce_panel_plugin_provider_get_name (XfcePanelPluginProvider *provider)
 {
   panel_return_val_if_fail (XFCE_IS_PANEL_PLUGIN_PROVIDER (provider), NULL);
diff --git a/libxfce4panel/xfce-panel-plugin-provider.h b/libxfce4panel/xfce-panel-plugin-provider.h
index 3c7d16d..ff43504 100644
--- a/libxfce4panel/xfce-panel-plugin-provider.h
+++ b/libxfce4panel/xfce-panel-plugin-provider.h
@@ -114,39 +114,39 @@ enum
 
 
 
-GType        xfce_panel_plugin_provider_get_type            (void) G_GNUC_CONST;
+GType                 xfce_panel_plugin_provider_get_type            (void) G_GNUC_CONST;
 
-const gchar *xfce_panel_plugin_provider_get_name            (XfcePanelPluginProvider       *provider);
+G_CONST_RETURN gchar *xfce_panel_plugin_provider_get_name            (XfcePanelPluginProvider       *provider);
 
-gint         xfce_panel_plugin_provider_get_unique_id       (XfcePanelPluginProvider       *provider);
+gint                  xfce_panel_plugin_provider_get_unique_id       (XfcePanelPluginProvider       *provider);
 
-void         xfce_panel_plugin_provider_set_size            (XfcePanelPluginProvider       *provider,
-                                                             gint                           size);
+void                  xfce_panel_plugin_provider_set_size            (XfcePanelPluginProvider       *provider,
+                                                                      gint                           size);
 
-void         xfce_panel_plugin_provider_set_orientation     (XfcePanelPluginProvider       *provider,
-                                                             GtkOrientation                 orientation);
+void                  xfce_panel_plugin_provider_set_orientation     (XfcePanelPluginProvider       *provider,
+                                                                      GtkOrientation                 orientation);
 
-void         xfce_panel_plugin_provider_set_screen_position (XfcePanelPluginProvider       *provider,
-                                                             XfceScreenPosition             screen_position);
+void                  xfce_panel_plugin_provider_set_screen_position (XfcePanelPluginProvider       *provider,
+                                                                      XfceScreenPosition             screen_position);
 
-void         xfce_panel_plugin_provider_save                (XfcePanelPluginProvider       *provider);
+void                  xfce_panel_plugin_provider_save                (XfcePanelPluginProvider       *provider);
 
-void         xfce_panel_plugin_provider_emit_signal         (XfcePanelPluginProvider       *provider,
-                                                             XfcePanelPluginProviderSignal  provider_signal);
+void                  xfce_panel_plugin_provider_emit_signal         (XfcePanelPluginProvider       *provider,
+                                                                      XfcePanelPluginProviderSignal  provider_signal);
 
-gboolean     xfce_panel_plugin_provider_get_show_configure  (XfcePanelPluginProvider       *provider);
+gboolean              xfce_panel_plugin_provider_get_show_configure  (XfcePanelPluginProvider       *provider);
 
-void         xfce_panel_plugin_provider_show_configure      (XfcePanelPluginProvider       *provider);
+void                  xfce_panel_plugin_provider_show_configure      (XfcePanelPluginProvider       *provider);
 
-gboolean     xfce_panel_plugin_provider_get_show_about      (XfcePanelPluginProvider       *provider);
+gboolean              xfce_panel_plugin_provider_get_show_about      (XfcePanelPluginProvider       *provider);
 
-void         xfce_panel_plugin_provider_show_about          (XfcePanelPluginProvider       *provider);
+void                  xfce_panel_plugin_provider_show_about          (XfcePanelPluginProvider       *provider);
 
-void         xfce_panel_plugin_provider_remove              (XfcePanelPluginProvider       *provider);
+void                  xfce_panel_plugin_provider_remove              (XfcePanelPluginProvider       *provider);
 
-gboolean     xfce_panel_plugin_provider_remote_event        (XfcePanelPluginProvider       *provider,
-                                                             const gchar                   *name,
-                                                             const GValue                  *value);
+gboolean              xfce_panel_plugin_provider_remote_event        (XfcePanelPluginProvider       *provider,
+                                                                      const gchar                   *name,
+                                                                      const GValue                  *value);
 
 G_END_DECLS
 
diff --git a/libxfce4panel/xfce-panel-plugin.c b/libxfce4panel/xfce-panel-plugin.c
index dd6c53b..2cf37a9 100644
--- a/libxfce4panel/xfce-panel-plugin.c
+++ b/libxfce4panel/xfce-panel-plugin.c
@@ -1299,7 +1299,7 @@ xfce_panel_plugin_take_window_notify (gpointer  data,
  *
  * Returns: the name of the panel plugin.
  **/
-const gchar *
+G_CONST_RETURN gchar *
 xfce_panel_plugin_get_name (XfcePanelPlugin *plugin)
 {
   g_return_val_if_fail (XFCE_IS_PANEL_PLUGIN (plugin), NULL);
@@ -1319,7 +1319,7 @@ xfce_panel_plugin_get_name (XfcePanelPlugin *plugin)
  *
  * Returns: the (translated) display name of the plugin.
  **/
-const gchar *
+G_CONST_RETURN gchar *
 xfce_panel_plugin_get_display_name (XfcePanelPlugin *plugin)
 {
   g_return_val_if_fail (XFCE_IS_PANEL_PLUGIN (plugin), NULL);
@@ -1342,7 +1342,7 @@ xfce_panel_plugin_get_display_name (XfcePanelPlugin *plugin)
  *
  * Returns: the (translated) comment of the plugin.
  **/
-const gchar *
+G_CONST_RETURN gchar *
 xfce_panel_plugin_get_comment (XfcePanelPlugin *plugin)
 {
   g_return_val_if_fail (XFCE_IS_PANEL_PLUGIN (plugin), NULL);
@@ -1388,7 +1388,7 @@ xfce_panel_plugin_get_unique_id (XfcePanelPlugin *plugin)
  * See also: xfconf_channel_new_with_property_base() and
  *           XFCE_PANEL_PLUGIN_CHANNEL_NAME.
  **/
-const gchar *
+G_CONST_RETURN gchar *
 xfce_panel_plugin_get_property_base (XfcePanelPlugin *plugin)
 {
   g_return_val_if_fail (XFCE_IS_PANEL_PLUGIN (plugin), NULL);
@@ -1421,7 +1421,7 @@ xfce_panel_plugin_get_property_base (XfcePanelPlugin *plugin)
  *
  * Since: 4.8.0
  **/
-const gchar * const *
+G_CONST_RETURN gchar * G_CONST_RETURN *
 xfce_panel_plugin_get_arguments (XfcePanelPlugin *plugin)
 {
   g_return_val_if_fail (XFCE_IS_PANEL_PLUGIN (plugin), NULL);
diff --git a/libxfce4panel/xfce-panel-plugin.h b/libxfce4panel/xfce-panel-plugin.h
index ea61291..2c7af6c 100644
--- a/libxfce4panel/xfce-panel-plugin.h
+++ b/libxfce4panel/xfce-panel-plugin.h
@@ -97,75 +97,76 @@ struct _XfcePanelPlugin
 
 
 
-GType                xfce_panel_plugin_get_type            (void) G_GNUC_CONST;
+GType                 xfce_panel_plugin_get_type            (void) G_GNUC_CONST;
 
-const gchar         *xfce_panel_plugin_get_name            (XfcePanelPlugin   *plugin) G_GNUC_PURE;
+G_CONST_RETURN gchar *xfce_panel_plugin_get_name            (XfcePanelPlugin   *plugin) G_GNUC_PURE;
 
-const gchar         *xfce_panel_plugin_get_display_name    (XfcePanelPlugin   *plugin) G_GNUC_PURE;
+G_CONST_RETURN gchar *xfce_panel_plugin_get_display_name    (XfcePanelPlugin   *plugin) G_GNUC_PURE;
 
-const gchar         *xfce_panel_plugin_get_comment         (XfcePanelPlugin   *plugin) G_GNUC_PURE;
+G_CONST_RETURN gchar *xfce_panel_plugin_get_comment         (XfcePanelPlugin   *plugin) G_GNUC_PURE;
 
-gint                 xfce_panel_plugin_get_unique_id       (XfcePanelPlugin   *plugin) G_GNUC_PURE;
+gint                  xfce_panel_plugin_get_unique_id       (XfcePanelPlugin   *plugin) G_GNUC_PURE;
 
-const gchar         *xfce_panel_plugin_get_property_base   (XfcePanelPlugin   *plugin) G_GNUC_PURE;
+G_CONST_RETURN gchar *xfce_panel_plugin_get_property_base   (XfcePanelPlugin   *plugin) G_GNUC_PURE;
 
-const gchar * const *xfce_panel_plugin_get_arguments       (XfcePanelPlugin   *plugin) G_GNUC_PURE;
+G_CONST_RETURN gchar * G_CONST_RETURN *
+                      xfce_panel_plugin_get_arguments       (XfcePanelPlugin   *plugin) G_GNUC_PURE;
 
-gint                 xfce_panel_plugin_get_size            (XfcePanelPlugin   *plugin) G_GNUC_PURE;
+gint                  xfce_panel_plugin_get_size            (XfcePanelPlugin   *plugin) G_GNUC_PURE;
 
-gboolean             xfce_panel_plugin_get_expand          (XfcePanelPlugin   *plugin) G_GNUC_PURE;
+gboolean              xfce_panel_plugin_get_expand          (XfcePanelPlugin   *plugin) G_GNUC_PURE;
 
-void                 xfce_panel_plugin_set_expand          (XfcePanelPlugin   *plugin,
-                                                            gboolean           expand);
+void                  xfce_panel_plugin_set_expand          (XfcePanelPlugin   *plugin,
+                                                             gboolean           expand);
 
-GtkOrientation       xfce_panel_plugin_get_orientation     (XfcePanelPlugin   *plugin) G_GNUC_PURE;
+GtkOrientation        xfce_panel_plugin_get_orientation     (XfcePanelPlugin   *plugin) G_GNUC_PURE;
 
-XfceScreenPosition   xfce_panel_plugin_get_screen_position (XfcePanelPlugin   *plugin) G_GNUC_PURE;
+XfceScreenPosition    xfce_panel_plugin_get_screen_position (XfcePanelPlugin   *plugin) G_GNUC_PURE;
 
-void                 xfce_panel_plugin_take_window         (XfcePanelPlugin   *plugin,
-                                                            GtkWindow         *window);
+void                  xfce_panel_plugin_take_window         (XfcePanelPlugin   *plugin,
+                                                             GtkWindow         *window);
 
-void                 xfce_panel_plugin_add_action_widget   (XfcePanelPlugin   *plugin,
-                                                            GtkWidget         *widget);
+void                  xfce_panel_plugin_add_action_widget   (XfcePanelPlugin   *plugin,
+                                                             GtkWidget         *widget);
 
-void                 xfce_panel_plugin_menu_insert_item    (XfcePanelPlugin   *plugin,
-                                                            GtkMenuItem       *item);
+void                  xfce_panel_plugin_menu_insert_item    (XfcePanelPlugin   *plugin,
+                                                             GtkMenuItem       *item);
 
-void                 xfce_panel_plugin_menu_show_configure (XfcePanelPlugin   *plugin);
+void                  xfce_panel_plugin_menu_show_configure (XfcePanelPlugin   *plugin);
 
-void                 xfce_panel_plugin_menu_show_about     (XfcePanelPlugin   *plugin);
+void                  xfce_panel_plugin_menu_show_about     (XfcePanelPlugin   *plugin);
 
-void                 xfce_panel_plugin_block_menu          (XfcePanelPlugin   *plugin);
+void                  xfce_panel_plugin_block_menu          (XfcePanelPlugin   *plugin);
 
-void                 xfce_panel_plugin_unblock_menu        (XfcePanelPlugin   *plugin);
+void                  xfce_panel_plugin_unblock_menu        (XfcePanelPlugin   *plugin);
 
-void                 xfce_panel_plugin_register_menu       (XfcePanelPlugin   *plugin,
-                                                            GtkMenu           *menu);
+void                  xfce_panel_plugin_register_menu       (XfcePanelPlugin   *plugin,
+                                                             GtkMenu           *menu);
 
-GtkArrowType         xfce_panel_plugin_arrow_type          (XfcePanelPlugin   *plugin);
+GtkArrowType          xfce_panel_plugin_arrow_type          (XfcePanelPlugin   *plugin);
 
-void                 xfce_panel_plugin_position_widget     (XfcePanelPlugin   *plugin,
-                                                            GtkWidget         *menu_widget,
-                                                            GtkWidget         *attach_widget,
-                                                            gint              *x,
-                                                            gint              *y);
+void                  xfce_panel_plugin_position_widget     (XfcePanelPlugin   *plugin,
+                                                             GtkWidget         *menu_widget,
+                                                             GtkWidget         *attach_widget,
+                                                             gint              *x,
+                                                             gint              *y);
 
-void                 xfce_panel_plugin_position_menu       (GtkMenu           *menu,
-                                                            gint              *x,
-                                                            gint              *y,
-                                                            gboolean          *push_in,
-                                                            gpointer           panel_plugin);
+void                  xfce_panel_plugin_position_menu       (GtkMenu           *menu,
+                                                             gint              *x,
+                                                             gint              *y,
+                                                             gboolean          *push_in,
+                                                             gpointer           panel_plugin);
 
-void                 xfce_panel_plugin_focus_widget        (XfcePanelPlugin   *plugin,
-                                                            GtkWidget         *widget);
+void                  xfce_panel_plugin_focus_widget        (XfcePanelPlugin   *plugin,
+                                                             GtkWidget         *widget);
 
-void                 xfce_panel_plugin_block_autohide      (XfcePanelPlugin   *plugin,
-                                                            gboolean           blocked);
+void                  xfce_panel_plugin_block_autohide      (XfcePanelPlugin   *plugin,
+                                                             gboolean           blocked);
 
-gchar               *xfce_panel_plugin_lookup_rc_file      (XfcePanelPlugin   *plugin) G_GNUC_MALLOC G_GNUC_WARN_UNUSED_RESULT;
+gchar                *xfce_panel_plugin_lookup_rc_file      (XfcePanelPlugin   *plugin) G_GNUC_MALLOC G_GNUC_WARN_UNUSED_RESULT;
 
-gchar               *xfce_panel_plugin_save_location       (XfcePanelPlugin   *plugin,
-                                                            gboolean           create) G_GNUC_MALLOC G_GNUC_WARN_UNUSED_RESULT;
+gchar                *xfce_panel_plugin_save_location       (XfcePanelPlugin   *plugin,
+                                                             gboolean           create) G_GNUC_MALLOC G_GNUC_WARN_UNUSED_RESULT;
 
 G_END_DECLS
 



More information about the Xfce4-commits mailing list