[glib: 1/2] docs: fix a misunderstanding in g_type_add_interface_*



commit 11dce0fd2fc3bae8ed08c1718f67c5ea8aadddf5
Author: Steve Frécinaux <code istique net>
Date:   Sat Aug 31 23:25:21 2019 +0200

    docs: fix a misunderstanding in g_type_add_interface_*
    
    The previous documentation said this:
      g_type_add_interface_static:
        "Adds the static interface_type to instantiable_type"
      g_type_add_interface_dynamic:
        "Adds the dynamic interface_type to instantiable_type"
    
    The above suggests that if one is adding a static interface to a dynamic
    object, one should use g_type_add_interface_static because the interface
    is static, but the code and usage (with the newly added
    G_IMPLEMENTS_INTERFACE_DYNAMIC) imply that this is wrong, and that
    what matters is whether the *instanciable_type* is dynamic or not.
    
    Hence this patch moves the "static" and "dynamic" words close to
    "instantiable_type".
    
    Closes issue #259

 gobject/gtype.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/gobject/gtype.c b/gobject/gtype.c
index 7d3789400..b5ef2d11e 100644
--- a/gobject/gtype.c
+++ b/gobject/gtype.c
@@ -2825,7 +2825,7 @@ g_type_register_dynamic (GType        parent_type,
  * @info: #GInterfaceInfo structure for this
  *        (@instance_type, @interface_type) combination
  *
- * Adds the static @interface_type to @instantiable_type.
+ * Adds @interface_type to the static @instantiable_type.
  * The information contained in the #GInterfaceInfo structure
  * pointed to by @info is used to manage the relationship.
  */
@@ -2861,7 +2861,7 @@ g_type_add_interface_static (GType                 instance_type,
  * @interface_type: #GType value of an interface type
  * @plugin: #GTypePlugin structure to retrieve the #GInterfaceInfo from
  *
- * Adds the dynamic @interface_type to @instantiable_type. The information
+ * Adds @interface_type to the dynamic @instantiable_type. The information
  * contained in the #GTypePlugin structure pointed to by @plugin
  * is used to manage the relationship.
  */


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]