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(); %}