mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-11-09 19:06:15 +01:00
gio: Also support modules built with MSVC
GIO modules built with MSVC do not begin with 'lib', but they can begin with 'gio'. Without this, you can only load GIO modules built with MSVC that are `name.dll`, not `gioname.dll`.
This commit is contained in:
parent
9aab30641e
commit
8e3fc7dfaa
@ -51,7 +51,8 @@ _g_io_module_extract_name (const char *filename)
|
||||
|
||||
if (g_str_has_prefix (bname, "libgio"))
|
||||
prefix_len = 6;
|
||||
else if (g_str_has_prefix (bname, "lib"))
|
||||
/* DLLs built with MSVC generally do not have the 'lib' prefix */
|
||||
else if (g_str_has_prefix (bname, "lib") || g_str_has_prefix (bname, "gio"))
|
||||
prefix_len = 3;
|
||||
else
|
||||
prefix_len = 0; /* use whole name (minus suffix) as plugin name */
|
||||
|
Loading…
Reference in New Issue
Block a user