Skip to content

Deprecate accessing GLibUnix/GLibWin32 APIs through GLib

Philip Chimento requested to merge ptomato/gjs:599-glib-gio-unix-win32 into master

Same for GioUnix/GioWin32 APIs accessed through Gio. Any g_unix_ and g_win32_ APIs should now be accessed through the GLibUnix/GLibWin32/ GioUnix/GioWin32 typelibs. The old way will still work, but we would like to encourage people to update.

This check occurs in the namespace object's resolve handler. I don't expect that to be a particularly hot path, so it's OK that we do a couple of g_str_has_prefix(). If that path turns out to be hot, it could be further optimized.

We also have to fix the gi.versions properties for GLibUnix, GioUnix, GLibWin32, and GioWin32 to '2.0'.

Finally, we have to make sure that the GioUnix or GioWin32 typelib is loaded before Gio, otherwise platform-specific types returned from introspected functions will be looked up in Gio instead of the platform- specific typelib.

See: glib!3892 (merged)

Closes: #599 (closed)

Merge request reports