Skip to content

Commit

Permalink
Merge pull request #331 from rolandlo/fix-core_module
Browse files Browse the repository at this point in the history
Fix core_module on MacOS for GLIB >= 2.76
  • Loading branch information
psychon authored Dec 27, 2024
2 parents 8e49fba + 0498cac commit a412921
Showing 1 changed file with 5 additions and 0 deletions.
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

0 comments on commit a412921

Please sign in to comment.