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
This commit is contained in:
Steve Frécinaux 2019-08-31 23:25:21 +02:00 committed by Emmanuel Fleury
parent ef47ecd665
commit 11dce0fd2f

View File

@ -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.
*/