GNOME Bugzilla – Bug 121386
glib-mkenums: Allow override of lowercase-ization for _get_type() function.
Last modified: 2011-02-18 16:07:08 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.
Created attachment 19707 [details] [review] glib_mkenums.patch
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.
* 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
OK, thanks.
So, may I commit this to HEAD?
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.
> 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.
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.
Tim, I don't know how to proceed on this.
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 ?
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?
glib/docs/reference/gobject/glib-mkenums.xml
Created attachment 21413 [details] [review] glib_mkenums2.patch
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.
I mean, glib_mkenums2.patch
May I apply this before the API freeze?
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...
Applied.