From 77c2f1b20657827f3a58d42355fccc81a24f4527 Mon Sep 17 00:00:00 2001 From: Stuart Cassoff Date: Sat, 17 Jan 2026 22:07:43 -0500 Subject: [PATCH] Adjust Python bindings for SWIG >= 4.4. Function signature changed in SWIG 4.4. Details: https://github.com/numpy/numpy/commit/1e424dae42a2d560520b6e053e8e60ac4205bfc7 --- bindings/python/sigrok/core/classes.i | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/bindings/python/sigrok/core/classes.i b/bindings/python/sigrok/core/classes.i index 90667f59c..5395f904f 100644 --- a/bindings/python/sigrok/core/classes.i +++ b/bindings/python/sigrok/core/classes.i @@ -74,7 +74,11 @@ typedef guint pyg_flags_type; */ if (!GLib) { fprintf(stderr, "Import of gi.repository.GLib failed.\n"); +#if (SWIG_VERSION < 0x040400) return nullptr; +#else + return 0; +#endif } import_array(); %}