clutter/0001-docs-Use-const-instead-G_CONST_RETURN.patch

61 lines
2.3 KiB
Diff
Raw Normal View History

2011-06-17 14:35:27 +00:00
From 443d48907374d5f2e34fc492448e35d028428faa Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Javier=20Jard=C3=B3n?= <jjardon@gnome.org>
Date: Wed, 8 Jun 2011 18:29:52 +0100
Subject: [PATCH 1/4] docs: Use const instead G_CONST_RETURN
https://bugzilla.gnome.org/show_bug.cgi?id=652129
---
doc/CODING_STYLE | 8 ++++----
doc/cookbook/examples/cb-button.c | 2 +-
doc/cookbook/examples/cb-button.h | 2 +-
3 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/doc/CODING_STYLE b/doc/CODING_STYLE
index 9f0a15b..b8682c8 100644
--- a/doc/CODING_STYLE
+++ b/doc/CODING_STYLE
@@ -406,10 +406,10 @@ definition should be vertically aligned in three columns:
The maximum width of each column is given by the longest element in the
column:
- void clutter_type_set_property (ClutterType *type,
- const gchar *value,
- GError **error);
- G_CONST_RETURN gchar *clutter_type_get_property (ClutterType *type);
+ void clutter_type_set_property (ClutterType *type,
+ const gchar *value,
+ GError **error);
+ const gchar *clutter_type_get_property (ClutterType *type);
It is also possible to align the columns to the next tab:
diff --git a/doc/cookbook/examples/cb-button.c b/doc/cookbook/examples/cb-button.c
index 0260d14..e02416c 100644
--- a/doc/cookbook/examples/cb-button.c
+++ b/doc/cookbook/examples/cb-button.c
@@ -429,7 +429,7 @@ cb_button_set_text_color (CbButton *self,
*
* Returns: the button's text. This must not be freed by the application.
*/
-G_CONST_RETURN gchar *
+const gchar *
cb_button_get_text (CbButton *self)
{
g_return_val_if_fail (CB_IS_BUTTON (self), NULL);
diff --git a/doc/cookbook/examples/cb-button.h b/doc/cookbook/examples/cb-button.h
index 9362a49..cf8adaf 100644
--- a/doc/cookbook/examples/cb-button.h
+++ b/doc/cookbook/examples/cb-button.h
@@ -67,7 +67,7 @@ struct _CbButtonClass
ClutterActor *cb_button_new (void);
/* getter */
-G_CONST_RETURN gchar * cb_button_get_text (CbButton *self);
+const gchar * cb_button_get_text (CbButton *self);
/* setters - these are wrappers round functions
* which change properties of the internal actors
--
1.7.5.4