[glib] [glib/gvarianttype] Move some documentation to header file
- From: Javier Jardón <jjardon src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [glib] [glib/gvarianttype] Move some documentation to header file
- Date: Tue, 26 Jan 2010 19:35:41 +0000 (UTC)
commit b0d2f344a68abcc14558c0363ffbe5bfdcba2a66
Author: Javier Jardón <jjardon gnome org>
Date: Tue Jan 26 19:15:48 2010 +0100
[glib/gvarianttype] Move some documentation to header file
Also, change G_VARIANT_TYPE(str) for G_VARIANT_TYPE(type_string)
so It's correctly documented now.
glib/gvarianttype.c | 23 -----------------------
glib/gvarianttype.h | 30 ++++++++++++++++++++++++++----
2 files changed, 26 insertions(+), 27 deletions(-)
---
diff --git a/glib/gvarianttype.c b/glib/gvarianttype.c
index 88ab510..8a773df 100644
--- a/glib/gvarianttype.c
+++ b/glib/gvarianttype.c
@@ -479,29 +479,6 @@
* </refsect2>
*/
-/**
- * GVariantType:
- *
- * A type in the GVariant type system.
- *
- * Two types may not be compared by value; use g_variant_type_equal() or
- * g_variant_type_is_subtype(). May be copied using
- * g_variant_type_copy() and freed using g_variant_type_free().
- **/
-
-/**
- * G_VARIANT_TYPE:
- * @type_string: a well-formed #GVariantType type string
- *
- * Converts a string to a const #GVariantType. Depending on the
- * current debugging level, this function may perform a runtime check
- * to ensure that @string is a valid GVariant type string.
- *
- * It is always a programmer error to use this macro with an invalid
- * type string.
- *
- * Since 2.24
- **/
static gboolean
g_variant_type_check (const GVariantType *type)
diff --git a/glib/gvarianttype.h b/glib/gvarianttype.h
index 4fbf420..1160754 100644
--- a/glib/gvarianttype.h
+++ b/glib/gvarianttype.h
@@ -26,6 +26,17 @@
#include <glib/gmessages.h>
#include <glib/gtypes.h>
+G_BEGIN_DECLS
+
+/**
+ * GVariantType:
+ *
+ * A type in the GVariant type system.
+ *
+ * Two types may not be compared by value; use g_variant_type_equal() or
+ * g_variant_type_is_subtype(). May be copied using
+ * g_variant_type_copy() and freed using g_variant_type_free().
+ **/
typedef struct _GVariantType GVariantType;
/**
@@ -216,14 +227,25 @@ typedef struct _GVariantType GVariantType;
**/
#define G_VARIANT_TYPE_DICTIONARY ((const GVariantType *) "a{?*}")
+/**
+ * G_VARIANT_TYPE:
+ * @type_string: a well-formed #GVariantType type string
+ *
+ * Converts a string to a const #GVariantType. Depending on the
+ * current debugging level, this function may perform a runtime check
+ * to ensure that @string is a valid GVariant type string.
+ *
+ * It is always a programmer error to use this macro with an invalid
+ * type string.
+ *
+ * Since 2.24
+ **/
#ifndef G_DISABLE_CHECKS
-# define G_VARIANT_TYPE(str) (g_variant_type_checked_ ((str)))
+# define G_VARIANT_TYPE(type_string) (g_variant_type_checked_ ((type_string)))
#else
-# define G_VARIANT_TYPE(str) ((const GVariantType *) (str))
+# define G_VARIANT_TYPE(type_string) ((const GVariantType *) (type_string))
#endif
-G_BEGIN_DECLS
-
/* type string checking */
gboolean g_variant_type_string_is_valid (const gchar *type_string);
gboolean g_variant_type_string_scan (const gchar *string,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]