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 121386 - glib-mkenums: Allow override of lowercase-ization for _get_type() function.
glib-mkenums: Allow override of lowercase-ization for _get_type() function.
Status: RESOLVED FIXED
Product: glib
Classification: Platform
Component: gobject
2.2.x
Other Linux
: Normal normal
: ---
Assigned To: gtkdev
gtkdev
Depends on:
Blocks: 121182
 
 
Reported: 2003-09-03 19:02 UTC by Murray Cumming
Modified: 2011-02-18 16:07 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
glib_mkenums.patch (2.31 KB, patch)
2003-09-03 19:03 UTC, Murray Cumming
none Details | Review
glib_mkenums2.patch (3.46 KB, patch)
2003-11-13 16:51 UTC, Murray Cumming
none Details | Review

Description Murray Cumming 2003-09-03 19:02:49 UTC
The patch (glib_mkenums.patch), as discussed with Owen on d-d-l:

      * gobject/glib-mkenums.in: Added a lowercase_name option, to be used
        next to the enum declaration, where the flag option is already used,
        when it is not possible to guess where to put the underscores in the
        _get_type() function name, for instance for GNOMEVFSURIHide.

You might not like the "lowercase_name" name. I'm not very attached to it.
Comment 1 Murray Cumming 2003-09-03 19:03:43 UTC
Created attachment 19707 [details] [review]
glib_mkenums.patch
Comment 2 Murray Cumming 2003-09-15 18:03:18 UTC
You have marked this for the 2.4 API freeze, but it would be really
nice to get this into a stable 2.2 tarball. I don't think it's API.
Comment 3 Owen Taylor 2003-09-15 18:12:54 UTC
* I *definitely* consider it API, since it's something
  that downstream packages depend on.
* But leaving that aside, no features go into stable branch
  by policy
* And leaving that aside, we don't have time to work on 
  feature backports to 2.2
Comment 4 Murray Cumming 2003-09-15 18:21:58 UTC
OK, thanks.
Comment 5 Murray Cumming 2003-10-01 13:38:24 UTC
So, may I commit this to HEAD?
Comment 6 Tim Janik 2003-10-02 06:53:51 UTC
this is not an acceptable patch, i'm not sure what it means to fix,
and what it does, it does only half (or less than that).
first, is GNOMEVFSURIHide meant to be word-seperated as
GNOME_VFS_URI_HIDE?
second, glib-mkenums parses header files full of enum definitions,
a single one can't be tweaked by using an option. if at all, a
mechanism similar to the current /*< prefix=... >*/ will have to be
provided.
and third, glib-mkenums has a manual page, patches changing the "API"
of the script need to reflect that in the manual page.
Comment 7 Murray Cumming 2003-10-02 15:38:35 UTC
> is GNOMEVFSURIHide meant to be word-seperated as GNOME_VFS_URI_HIDE?
Yes.

> a single one can't be tweaked by using an option.

This is what Owen suggested on the mailing list. I don't understand
why it is not an acceptable solution. It works when used by the patch
in the dependent gnome-vfs bug.

> if at all, a mechanism similar to the current /*< prefix=... >*/ 
> will have to be provided.

I can not find any example of this "prefix" mechanism in use in GTK+,
but I see it in glib-mkenums.in. I think that this patch implements
what you are describing. You can see it in use at the bottom of this
patch:
http://bugzilla.gnome.org/showattachment.cgi?attach_id=20408

> patches changing the "API" of the script need to reflect that 
> in the manual page.

OK. I will try to do that when we have figured out how you want me to
implement this.
Comment 8 Matthias Clasen 2003-10-02 21:12:18 UTC
If you update the man page, don't forget to update the copy which is
included in the api docs, that is docs/reference/gobject/glib-mkenums.xml.
Comment 9 Murray Cumming 2003-10-25 13:23:45 UTC
Tim, I don't know how to proceed on this.
Comment 10 Matthias Clasen 2003-10-25 22:13:00 UTC
Murray, I think Tim misread your patch and thinks it add a _cmdline_
option to set the lowercase name, when in fact it does exacly what he
suggests, namely providing "mechanism similar to the current /*<
prefix=... >*/".

Tim ?
Comment 11 Murray Cumming 2003-11-09 11:57:19 UTC
I will workaround this in gnome-vfs instead.

But anyway, I will try to make this acceptable for you for the future.
Sorry, I have never written a man page. Where is the source of the man
page in glib?
Comment 12 Matthias Clasen 2003-11-09 20:24:35 UTC
glib/docs/reference/gobject/glib-mkenums.xml
Comment 13 Murray Cumming 2003-11-13 16:51:24 UTC
Created attachment 21413 [details] [review]
glib_mkenums2.patch
Comment 14 Murray Cumming 2003-11-13 16:52:23 UTC
That's the reference documentation that you mentioned before. I don't
find any separate file for the man page. Here (glib_mkenums.patch) is
the updated patch. 
Comment 15 Murray Cumming 2003-11-13 16:52:40 UTC
I mean, glib_mkenums2.patch
Comment 16 Murray Cumming 2003-12-06 17:21:47 UTC
May I apply this before the API freeze?
Comment 17 Matthias Clasen 2003-12-23 00:19:58 UTC
I think the patch is fine to apply; Tims commment was obviously based
on  superficial reading of the patch. I doubt that you can get him to
comment on this again; I have several bugs which are stuck in his
patch review queue forever; its a bit unfortunate that such a central
piece of  infrastructure has an uninterested maintainer...
Comment 18 Murray Cumming 2003-12-30 10:42:55 UTC
Applied.