Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix core_module on MacOS for GLIB >= 2.76 #331

Merged
merged 1 commit into from
Dec 27, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions lgi/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -556,10 +556,15 @@ core_module (lua_State *L)
luaL_checkstring (L, 1));

#if defined(__APPLE__)
/* GLib 2.76 improved g_module_open() on MacOS, see
https://gitlab.gnome.org/GNOME/glib/-/merge_requests/2950. For
older GLib versions, use the previous workaround. */
#if !GLIB_CHECK_VERSION(2, 76, 0)
char *path = g_module_build_path (GOBJECT_INTROSPECTION_LIBDIR,
name);
g_free(name);
name = path;
#endif
#endif

/* Try to load the module. */
Expand Down
Loading