Skip to content

Commit

Permalink
Make this work with glib-2.84
Browse files Browse the repository at this point in the history
  • Loading branch information
rhx committed Mar 12, 2025
1 parent a888dd6 commit 5f78aad
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 2 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ on macOS, or on Linux you should get something like:

### Gtk 3.22 or higher

The Swift wrappers have been tested with glib-2.56, 2.58, 2.60, 2.62, 2.64, 2.66, 2.68, 2.70, 2.72, 2.74, 2.76, 2.78, 2.80 and 2.82, and gdk/gtk 3.22, 3.24 as well as 4.0, 4.2, 4.4, 4.6, 4.8, 4.10, 4.12, 4.14, and 4.16 on the `gtk4` branch. They should work with higher versions, but YMMV. Also make sure you have `gobject-introspection` and its `.gir` files installed.
The Swift wrappers have been tested with glib-2.56, 2.58, 2.60, 2.62, 2.64, 2.66, 2.68, 2.70, 2.72, 2.74, 2.76, 2.78, 2.80, 2.82 and 2.84, and gdk/gtk 3.22, 3.24 as well as 4.0, 4.2, 4.4, 4.6, 4.8, 4.10, 4.12, 4.14, and 4.16 on the `gtk4` branch. They should work with higher versions, but YMMV. Also make sure you have `gobject-introspection` and its `.gir` files installed.

#### Linux

Expand Down
4 changes: 3 additions & 1 deletion Sources/CGLib/glib_bridging.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ extern int g_open(const char *, int, ...) __nonnull ((1));
#include <glib/gversion.h>
#include <glib/gversionmacros.h>
#undef __GLIB_H_INSIDE__
#if defined(__linux__) && defined(__aarch64__)
#if defined(__linux__)
#undef g_open
#endif

Expand Down Expand Up @@ -70,7 +70,9 @@ struct _GUnixSocketAddressPrivate {};
struct _GUri {};
struct _GVariant {};
struct _GVariantType {};
#if GLIB_MAJOR_VERSION == 2 && GLIB_MINOR_VERSION < 84
struct GMainContextPusher {};
#endif
struct GMutexLocker {};
struct GTestCase {};
struct GTestSuite {};
Expand Down
2 changes: 2 additions & 0 deletions Sources/GLib/GLib-2.0-2.84.0.sed
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
s|UnsafeMutablePointer<GMainContextPusher>|UnsafeMutableRawPointer|g
s|UnsafePointer<GMainContextPusher>|UnsafeRawPointer|g
3 changes: 3 additions & 0 deletions Sources/GLib/GLib-2.0.exclude
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,6 @@ String_autoptr
g_iconv
g_time_zone_new
macro__has_attribute___noreturn__
macro__has_attribute_ifunc
macro__has_attribute_no_sanitize_address
MainContextPusher

0 comments on commit 5f78aad

Please sign in to comment.