Logo Search packages:      
Sourcecode: inkscape version File versions

void cr_statement_destroy ( CRStatement *  a_this  ) 

Destructor of CRStatement.

Definition at line 2556 of file cr-statement.c.

Referenced by cr_statement_ruleset_parse_from_buf(), and cr_stylesheet_destroy().

{
        CRStatement *cur = NULL;

        g_return_if_fail (a_this);

        /*go get the tail of the list */
        for (cur = a_this; cur && cur->next; cur = cur->next) {
                cr_statement_clear (cur);
        }

        if (cur)
                cr_statement_clear (cur);

        if (cur->prev == NULL) {
                g_free (a_this);
                return;
        }

        /*walk backward and free next element */
        for (cur = cur->prev; cur && cur->prev; cur = cur->prev) {
                if (cur->next) {
                        g_free (cur->next);
                        cur->next = NULL;
                }
        }

        if (!cur)
                return;

        /*free the one remaining list */
        if (cur->next) {
                g_free (cur->next);
                cur->next = NULL;
        }

        g_free (cur);
        cur = NULL;
}


Generated by  Doxygen 1.6.0   Back to index