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 793219 - Missing static quark function method for enums with glib:error-domain.
Missing static quark function method for enums with glib:error-domain.
Product: gobject-introspection
Classification: Platform
Component: g-ir-scanner
Other Linux
: Normal normal
: ---
Assigned To: gobject-introspection Maintainer(s)
gobject-introspection Maintainer(s)
Depends on:
Reported: 2018-02-06 14:25 UTC by Tomasz Miąsko
Modified: 2018-02-08 12:49 UTC
See Also:
GNOME target: ---
GNOME version: ---

Pair error quark functions with error enums. (15.67 KB, patch)
2018-02-06 14:25 UTC, Tomasz Miąsko
none Details | Review

Description Tomasz Miąsko 2018-02-06 14:25:33 UTC
Created attachment 367958 [details] [review]
Pair error quark functions with error enums.

For example GOptionError has error domain "g-option-context-error-quark",
but it doesn't have "quark" as associated static member function. 

When generating bindings for static language it would be more convenient to
actually have name of function returning quark for given enum, rather than
merely stringified version of it.

Current behaviour is a result of the fact that MainTransformer
_pair_quarks_with_enums method (which fills out the error_domain) uses slightly
different matching algorithm than one used in _pair_static_method (which moves
functions to associated type as static method).

It would be nice to use exactly the same approach in both cases, i.e., whenever
error domain is filled, the quark function is paired as well. See attached
patch for one possible solution.
Comment 1 GNOME Infrastructure Team 2018-02-08 12:49:34 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: