mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-08-02 07:23:41 +02:00
girepository: Fix declaration of ‘find using interfaces’ methods
Fix the declaration and documentation of `gi_object_info_find_method_using_interfaces()` and `gi_object_info_find_vfunc_using_interfaces()`. The documentation was wrong when I wrote it: the value returned is the object or interface which declares the method or vfunc, not the one which implements it. The returned declarer info may be a `GIObjectInfo` or a `GIInterfaceInfo`. Since those two types have no subtype relation between them, the return type has to be changed to `GIBaseInfo`. Using `GIObjectInfo` would have been fine in girepository-1.0 because all `*Info` types were aliases of each other — but since the move to `GTypeInstance` this is no longer true. A unit test will be in the following commit. Signed-off-by: Philip Withnall <pwithnall@gnome.org> Fixes: #3246
This commit is contained in:
@@ -156,7 +156,7 @@ GIFunctionInfo * gi_object_info_find_method (GIObjectInfo *info,
|
||||
GI_AVAILABLE_IN_ALL
|
||||
GIFunctionInfo * gi_object_info_find_method_using_interfaces (GIObjectInfo *info,
|
||||
const char *name,
|
||||
GIObjectInfo **implementor);
|
||||
GIBaseInfo **declarer);
|
||||
|
||||
|
||||
GI_AVAILABLE_IN_ALL
|
||||
@@ -186,7 +186,7 @@ GIVFuncInfo * gi_object_info_find_vfunc (GIObjectInfo *info,
|
||||
GI_AVAILABLE_IN_ALL
|
||||
GIVFuncInfo * gi_object_info_find_vfunc_using_interfaces (GIObjectInfo *info,
|
||||
const char *name,
|
||||
GIObjectInfo **implementor);
|
||||
GIBaseInfo **declarer);
|
||||
|
||||
GI_AVAILABLE_IN_ALL
|
||||
unsigned int gi_object_info_get_n_constants (GIObjectInfo *info);
|
||||
|
Reference in New Issue
Block a user