Logo Search packages:      
Sourcecode: inkscape version File versions

GList* cr_utils_dup_glist_of_string ( GList *  a_list_of_strings  ) 

Duplicates a list of GString instances.

the duplicated list of GString instances or NULL if something bad happened.
a_list_of_strings the list of strings to be duplicated.

Definition at line 1302 of file cr-utils.c.

        GList *cur = NULL,
                *result = NULL;

        g_return_val_if_fail (a_list_of_strings, NULL);

        for (cur = a_list_of_strings; cur; cur = cur->next) {
                GString *str = NULL;

                str = g_string_new_len (((GString *) cur->data)->str,
                                        ((GString *) cur->data)->len);
                if (str)
                        result = g_list_append (result, str);

        return result;

Generated by  Doxygen 1.6.0   Back to index