[glib] Document restrictions on private names
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib] Document restrictions on private names
- Date: Fri, 26 Jul 2013 18:42:31 +0000 (UTC)
commit 3b01cbe8a8a9ee2d1169f072624069877b91097c
Author: Matthias Clasen <mclasen redhat com>
Date: Fri Jul 26 14:40:10 2013 -0400
Document restrictions on private names
With the new machinery, private structs must be named
TypeNamePrivate if TypeName is the name of the instance
struct.
gobject/gtype.h | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
---
diff --git a/gobject/gtype.h b/gobject/gtype.h
index a10316a..cc268d3 100644
--- a/gobject/gtype.h
+++ b/gobject/gtype.h
@@ -1353,6 +1353,9 @@ guint g_type_get_type_registration_serial (void);
* instance data to the type. Furthermore, it defines a *_get_type() function. See G_DEFINE_TYPE_EXTENDED()
* for an example.
*
+ * Note that private structs added with this macros must have a struct
+ * name of the form <repaceable>@TN</replaceable>Private.
+ *
* Since: 2.38
*/
#define G_DEFINE_TYPE_WITH_PRIVATE(TN, t_n, T_P) G_DEFINE_TYPE_EXTENDED (TN, t_n, T_P, 0,
G_ADD_PRIVATE (TN))
@@ -1575,6 +1578,9 @@ guint g_type_get_type_registration_serial (void);
* Note that this macro can only be used together with the G_DEFINE_TYPE_*
* macros, since it depends on variable names from those macros.
*
+ * Also note that private structs added with these macros must have a struct
+ * name of the form <repaceable>TypeName</replaceable>Private.
+ *
* Since: 2.38
*/
#define G_ADD_PRIVATE(TypeName) { \
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]