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 666456 - Not clearly documented behavior of g_key_file_set_comment function.
Not clearly documented behavior of g_key_file_set_comment function.
Status: RESOLVED OBSOLETE
Product: glib
Classification: Platform
Component: docs
unspecified
Other Linux
: Normal normal
: ---
Assigned To: gtkdev
gtkdev
Depends on:
Blocks:
 
 
Reported: 2011-12-18 14:45 UTC by armel.mangean
Modified: 2018-05-24 13:37 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
IRC conversation about the problem (1.41 KB, text/plain)
2011-12-18 14:45 UTC, armel.mangean
Details

Description armel.mangean 2011-12-18 14:45:23 UTC
Created attachment 203798 [details]
IRC conversation about the problem

Hi,

I am new to Glib developing and to bugtrack platform.
I am also not being a native english speaker.
Please excuse me for this in advance.

So, I've tried to use GKeyFile component.
Using g_key_file_set_string passing an unexisting group name do create the group whereas using g_key_file_set_comment doesn't.
Though that the documentation has a lack of clarity about that.

(It should be tested with others g_key_file_set* functions).

I hope I've been clear.
Thanks alot for your work !
Comment 1 David King 2011-12-18 14:50:23 UTC
Sure enough, in g_key_file_set_group_comment(), which is eventually called by g_key_file_set_comment(), there is a check, using g_key_file_lookup_group(), which errors out early if the group name does not exist:

http://git.gnome.org/browse/glib/tree/glib/gkeyfile.c#n3139
Comment 2 GNOME Infrastructure Team 2018-05-24 13:37:31 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/glib/issues/490.