/* Returns CR_OK upon succesful completion, an error code otherwise.  */
enum CRStatus cr_sel_eng_unregister_all_pseudo_class_sel_handlers(CRSelEng *a_this)
/* Returns CR_OK upon succesful completion, an error code otherwise.  */
enum CRStatus cr_sel_eng_unregister_all_pseudo_class_sel_handlers(CRSelEng *a_this)
{
        GList *elem = NULL;
        struct CRPseudoClassSelHandlerEntry *entry = NULL;
        g_return_val_if_fail (a_this && PRIVATE (a_this), CR_BAD_PARAM_ERROR);
        if (!PRIVATE (a_this)->pcs_handlers)
                return CR_OK;
        for (elem = PRIVATE (a_this)->pcs_handlers;
             elem; elem = g_list_next (elem)) {
                entry = elem->data;
                if (!entry)
                        continue;
                if (entry->name) {
                        g_free (entry->name);
                        entry->name = NULL;
                }
                g_free (entry);
                elem->data = NULL;
        }
        g_list_free (PRIVATE (a_this)->pcs_handlers);
        PRIVATE (a_this)->pcs_handlers = NULL;
        return CR_OK;
}