GNOME Bugzilla – Bug 752058
Warn incorrect callback annotations
Last modified: 2018-02-08 12:36:19 UTC
Annotations on callback can be very confusing due to to many annotations, particularly where they should be placed. This generally comes down to using (closure) on the incorrect parameter but it can also be nice to work on incorrect (destroy) and (scope) usage.
Created attachment 306996 [details] [review] scanner: Warn on incorrect callback annotations This is particularly import for (closure) which is frequently misused. Tested by building the .gir for GLib, GObject, Gio, Gdk, Gtk, Peas, GtkSourceView and Gedit. No false positives and looks like all 71 uses in Gio are incorrect... Only 2 of them are of worry as they are required for function with multiple callback parameters, see g_desktop_app_info_launch_uris_as_manager(). The rest of them are just unnecessary as the scanner will guess/predict the closure correctly.
-- GitLab Migration Automatic Message -- This bug has been migrated to GNOME's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/gobject-introspection/issues/137.