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 749785 - Consider 'data' as a closure arg name
Consider 'data' as a closure arg name
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-05-24 04:47 UTC by Garrett Regier
Modified: 2018-02-08 12:35 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Scanner: Consider 'data' as a closure argument name (20.43 KB, patch)
2015-06-03 14:46 UTC, Garrett Regier
none Details | Review

Description Garrett Regier 2015-05-24 04:47:03 UTC
Currently closure arg names are restricted to 'user_data' which misses the closure argument for multiple callbacks in glib/gobject/gio and other libraries. Many of the callbacks missing the closure argument call it 'data' instead.
Comment 1 Garrett Regier 2015-06-03 14:46:15 UTC
Created attachment 304524 [details] [review]
Scanner: Consider 'data' as a closure argument name

However, only guess if another closure argument name has not already been specified or determined.

As seen in the diff this fixes a number of cases just in the tests, there are many more cases in glib/gtk+ which are also fixed. This also makes it more practical for PyGObject to be careful about the closure, currently it manually checks the type.

https://git.gnome.org/browse/pygobject/tree/gi/pygi-closure.c#n391
Comment 2 GNOME Infrastructure Team 2018-02-08 12:35:23 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/133.