After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 752058 - Warn incorrect callback annotations
Warn incorrect callback annotations
Status: RESOLVED OBSOLETE
Product: gobject-introspection
Classification: Platform
Component: g-ir-scanner
2.43.x
Other Linux
: Normal normal
: ---
Assigned To: gobject-introspection Maintainer(s)
gobject-introspection Maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2015-07-07 10:55 UTC by Garrett Regier
Modified: 2018-02-08 12:36 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
scanner: Warn on incorrect callback annotations (17.16 KB, patch)
2015-07-07 11:07 UTC, Garrett Regier
none Details | Review

Description Garrett Regier 2015-07-07 10:55:24 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.
Comment 1 Garrett Regier 2015-07-07 11:07:19 UTC
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.
Comment 2 GNOME Infrastructure Team 2018-02-08 12:36:19 UTC
-- 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.