[json-glib] Remove G_CONST_RETURN usage
- From: Emmanuele Bassi <ebassi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [json-glib] Remove G_CONST_RETURN usage
- Date: Thu, 9 Jun 2011 16:23:29 +0000 (UTC)
commit c994a9bfdc13aba1b7c5fd019853c68fb38148a6
Author: Emmanuele Bassi <ebassi linux intel com>
Date: Thu Jun 9 17:23:04 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.
json-glib/json-array.c | 2 +-
json-glib/json-node.c | 6 +++---
json-glib/json-object.c | 2 +-
json-glib/json-reader.c | 6 +++---
json-glib/json-reader.h | 6 +++---
json-glib/json-types-private.h | 2 +-
json-glib/json-types.h | 8 ++++----
7 files changed, 16 insertions(+), 16 deletions(-)
---
diff --git a/json-glib/json-array.c b/json-glib/json-array.c
index 3a21d9e..44caf1e 100644
--- a/json-glib/json-array.c
+++ b/json-glib/json-array.c
@@ -316,7 +316,7 @@ json_array_get_boolean_element (JsonArray *array,
*
* Since: 0.8
*/
-G_CONST_RETURN gchar *
+const gchar *
json_array_get_string_element (JsonArray *array,
guint index_)
{
diff --git a/json-glib/json-node.c b/json-glib/json-node.c
index f136b06..67cdc95 100644
--- a/json-glib/json-node.c
+++ b/json-glib/json-node.c
@@ -451,7 +451,7 @@ json_node_free (JsonNode *node)
* Return value: a string containing the name of the type. The returned string
* is owned by the node and should never be modified or freed
*/
-G_CONST_RETURN gchar *
+const gchar *
json_node_type_name (JsonNode *node)
{
g_return_val_if_fail (node != NULL, "(null)");
@@ -470,7 +470,7 @@ json_node_type_name (JsonNode *node)
return "unknown";
}
-G_CONST_RETURN gchar *
+const gchar *
json_node_type_get_name (JsonNodeType node_type)
{
switch (node_type)
@@ -568,7 +568,7 @@ json_node_set_string (JsonNode *node,
*
* Return value: a string value.
*/
-G_CONST_RETURN gchar *
+const gchar *
json_node_get_string (JsonNode *node)
{
g_return_val_if_fail (node != NULL, NULL);
diff --git a/json-glib/json-object.c b/json-glib/json-object.c
index e8e88fb..9c6d585 100644
--- a/json-glib/json-object.c
+++ b/json-glib/json-object.c
@@ -669,7 +669,7 @@ json_object_get_null_member (JsonObject *object,
*
* Since: 0.8
*/
-G_CONST_RETURN gchar *
+const gchar *
json_object_get_string_member (JsonObject *object,
const gchar *member_name)
{
diff --git a/json-glib/json-reader.c b/json-glib/json-reader.c
index 8da7e5e..73e0ea3 100644
--- a/json-glib/json-reader.c
+++ b/json-glib/json-reader.c
@@ -329,7 +329,7 @@ json_reader_set_error (JsonReader *reader,
*
* Since: 0.12
*/
-G_CONST_RETURN GError *
+const GError *
json_reader_get_error (JsonReader *reader)
{
g_return_val_if_fail (JSON_IS_READER (reader), FALSE);
@@ -852,7 +852,7 @@ json_reader_get_double_value (JsonReader *reader)
*
* Since: 0.12
*/
-G_CONST_RETURN gchar *
+const gchar *
json_reader_get_string_value (JsonReader *reader)
{
g_return_val_if_fail (JSON_IS_READER (reader), NULL);
@@ -924,7 +924,7 @@ json_reader_get_null_value (JsonReader *reader)
*
* Since: 0.14
*/
-G_CONST_RETURN gchar *
+const gchar *
json_reader_get_member_name (JsonReader *reader)
{
g_return_val_if_fail (JSON_IS_READER (reader), NULL);
diff --git a/json-glib/json-reader.h b/json-glib/json-reader.h
index 6cea36b..05d0735 100644
--- a/json-glib/json-reader.h
+++ b/json-glib/json-reader.h
@@ -113,7 +113,7 @@ JsonReader * json_reader_new (JsonNode *node);
void json_reader_set_root (JsonReader *reader,
JsonNode *root);
-G_CONST_RETURN GError *json_reader_get_error (JsonReader *reader);
+const GError * json_reader_get_error (JsonReader *reader);
gboolean json_reader_is_array (JsonReader *reader);
gboolean json_reader_read_element (JsonReader *reader,
@@ -127,13 +127,13 @@ gboolean json_reader_read_member (JsonReader *reader,
void json_reader_end_member (JsonReader *reader);
gint json_reader_count_members (JsonReader *reader);
gchar ** json_reader_list_members (JsonReader *reader);
-G_CONST_RETURN gchar * json_reader_get_member_name (JsonReader *reader);
+const gchar * json_reader_get_member_name (JsonReader *reader);
gboolean json_reader_is_value (JsonReader *reader);
JsonNode * json_reader_get_value (JsonReader *reader);
gint64 json_reader_get_int_value (JsonReader *reader);
gdouble json_reader_get_double_value (JsonReader *reader);
-G_CONST_RETURN gchar * json_reader_get_string_value (JsonReader *reader);
+const gchar * json_reader_get_string_value (JsonReader *reader);
gboolean json_reader_get_boolean_value (JsonReader *reader);
gboolean json_reader_get_null_value (JsonReader *reader);
diff --git a/json-glib/json-types-private.h b/json-glib/json-types-private.h
index d0e073e..e7f73f2 100644
--- a/json-glib/json-types-private.h
+++ b/json-glib/json-types-private.h
@@ -59,7 +59,7 @@ struct _JsonObject
volatile gint ref_count;
};
-G_CONST_RETURN gchar *json_node_type_get_name (JsonNodeType node_type);
+const gchar *json_node_type_get_name (JsonNodeType node_type);
G_END_DECLS
diff --git a/json-glib/json-types.h b/json-glib/json-types.h
index b95c356..ecbf198 100644
--- a/json-glib/json-types.h
+++ b/json-glib/json-types.h
@@ -184,7 +184,7 @@ GType json_node_get_value_type (JsonNode *node);
void json_node_set_parent (JsonNode *node,
JsonNode *parent);
JsonNode * json_node_get_parent (JsonNode *node);
-G_CONST_RETURN gchar *json_node_type_name (JsonNode *node);
+const gchar * json_node_type_name (JsonNode *node);
void json_node_set_object (JsonNode *node,
JsonObject *object);
@@ -204,7 +204,7 @@ void json_node_get_value (JsonNode *node,
GValue *value);
void json_node_set_string (JsonNode *node,
const gchar *value);
-G_CONST_RETURN gchar *json_node_get_string (JsonNode *node);
+const gchar * json_node_get_string (JsonNode *node);
gchar * json_node_dup_string (JsonNode *node);
void json_node_set_int (JsonNode *node,
gint64 value);
@@ -265,7 +265,7 @@ gdouble json_object_get_double_member (JsonObject *object,
const gchar *member_name);
gboolean json_object_get_boolean_member (JsonObject *object,
const gchar *member_name);
-G_CONST_RETURN gchar *json_object_get_string_member (JsonObject *object,
+const gchar * json_object_get_string_member (JsonObject *object,
const gchar *member_name);
gboolean json_object_get_null_member (JsonObject *object,
const gchar *member_name);
@@ -312,7 +312,7 @@ gdouble json_array_get_double_element (JsonArray *array,
guint index_);
gboolean json_array_get_boolean_element (JsonArray *array,
guint index_);
-G_CONST_RETURN gchar *json_array_get_string_element (JsonArray *array,
+const gchar * json_array_get_string_element (JsonArray *array,
guint index_);
gboolean json_array_get_null_element (JsonArray *array,
guint index_);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]