From 3b01cbe8a8a9ee2d1169f072624069877b91097c Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Fri, 26 Jul 2013 14:40:10 -0400 Subject: [PATCH] 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 file changed, 6 insertions(+) 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 @TNPrivate. + * * 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 TypeNamePrivate. + * * Since: 2.38 */ #define G_ADD_PRIVATE(TypeName) { \ -- 2.7.4