/* Returns CR_OK upon successfull completion, an error code otherwise.  */
enum CRStatus cr_statement_ruleset_set_decl_list(CRStatement *a_this, CRDeclaration *a_list)
/* Returns CR_OK upon successfull completion, an error code otherwise.  */
enum CRStatus cr_statement_ruleset_set_decl_list(CRStatement *a_this, CRDeclaration *a_list)
{
        g_return_val_if_fail (a_this && a_this->type == RULESET_STMT
                              && a_this->kind.ruleset, CR_BAD_PARAM_ERROR);
        if (a_this->kind.ruleset->decl_list == a_list)
                return CR_OK;
        if (a_this->kind.ruleset->sel_list) {
                cr_declaration_destroy (a_this->kind.ruleset->decl_list);
        }
        a_this->kind.ruleset->sel_list = NULL;
        return CR_OK;
}