From 154b24c055a3de38f6a33a3ec297e416150c4f0e Mon Sep 17 00:00:00 2001 From: Philip Withnall Date: Thu, 27 Dec 2018 23:46:42 +0000 Subject: [PATCH] gtype: Document type for iface_default_init() function MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit And mention why it’s not a GInterfaceInitFunc as people who have read the GObject docs cover-to-cover might expect. Signed-off-by: Philip Withnall --- gobject/gtype.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/gobject/gtype.h b/gobject/gtype.h index 0d366e67b..70181cd5c 100644 --- a/gobject/gtype.h +++ b/gobject/gtype.h @@ -1753,6 +1753,12 @@ guint g_type_get_type_registration_serial (void); * name `t_n ## _default_init`, and the interface structure to have the * name `TN ## Interface`. * + * The initialization function has signature + * `static void t_n ## _default_init (TypeName##Interface *klass);`, rather than + * the full #GInterfaceInitFunc signature, for brevity and convenience. If you + * need to use an initialization function with an `iface_data` argument, you + * must write the #GTypeInterface definitions manually. + * * Since: 2.24 */ #define G_DEFINE_INTERFACE(TN, t_n, T_P) G_DEFINE_INTERFACE_WITH_CODE(TN, t_n, T_P, ;)