mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-08-01 23:13:40 +02:00
girepository: Make gi_repository_find_by_gtype() deterministic
When faced with a `GType` which is present in multiple typelibs, the old implementation was not deterministic, as it iterated over a hash table of typelibs. The iteration order of a hash table is not deterministic. Use the new `ordered_typelibs` and `ordered_lazy_typelibs` arrays to iterate instead, making the order deterministic. Add a unit test to check this. In particular, to check that symbols which are present in both `Gio` and `GioUnix` are correctly resolved as being from `GioUnix`. Signed-off-by: Philip Withnall <pwithnall@gnome.org> Helps: #3303
This commit is contained in:
@@ -261,6 +261,7 @@ if host_system == 'windows'
|
||||
'--identifier-prefix=GWin32'
|
||||
],
|
||||
)
|
||||
gio_platform_gir = gio_win32_gir
|
||||
else
|
||||
gio_unix_gir_c_includes = []
|
||||
foreach h: gio_unix_include_headers
|
||||
@@ -289,6 +290,7 @@ else
|
||||
'--identifier-prefix=GUnix'
|
||||
],
|
||||
)
|
||||
gio_platform_gir = gio_unix_gir
|
||||
endif
|
||||
|
||||
# GIRepository
|
||||
|
Reference in New Issue
Block a user