Details
[Home]
Issue of the Implementation # D0055
Brief
Inconsistency between standard and implementation of the interface "g_key_file_get_boolean_list"
Detailed Description
Documentation for the interface g_key_file_get_boolean_list states: "Returns the values associated with key under group_name as booleans. If group_name is NULL, the start_group is used.". But invocation of the interface with the parameter "group_name" = NULL returns with the following error message "GLib-CRITICAL **: g_key_file_get_boolean_list: assertion `group_name != NULL' failed".
Problem location(s) in the standard
Linux Standard Base Desktop Specification 3.1, Chapter 12. Libraries, 12.2 Interfaces for libglib-2.0; http://www.gtk.org/api/2.6/glib/glib-Key-value-file-parser.html#g-key-file-get-boolean-list
Example
#include <stdio.h> #include <string.h> #include <glib.h> char *boolText="# this is just an example \n[First Group]\nNumbers=10,20,1,0\n"\ "True=true \n False=false \n BooleanList=true,false,true,true\n\n# another"\ "group \n[Another Group]\n True=true \n False=false \n BooleanList=true,"\ "false,true,true\nNumbers=10,20,1,0\n "; #define KEY "True" int main () { GKeyFile *gkf = NULL; gsize len = 0; gkf=g_key_file_new (); g_key_file_load_from_data (gkf, boolText, strlen (boolText), G_KEY_FILE_NONE, NULL); g_key_file_get_boolean_list (gkf, NULL, KEY, &len, NULL); return 0; }
Component
gtk-glib 2.6.2 or later
Accepted
Gnome Bugzilla 476856
Status
Fixed in gtk-glib - 2.16
[Home]