+/* Returns D's attribute set. The caller may examine or modify
+ the attribute set, but must not destroy it. Destroying D or
+ calling dict_set_attributes for D will also destroy D's
+ attribute set. */
+struct attrset *
+dict_get_attributes (const struct dictionary *d)
+{
+ return (struct attrset *) &d->attributes;
+}
+
+/* Replaces D's attributes set by a copy of ATTRS. */
+void
+dict_set_attributes (struct dictionary *d, const struct attrset *attrs)
+{
+ attrset_destroy (&d->attributes);
+ attrset_clone (&d->attributes, attrs);
+}
+
+/* Returns true if D has at least one attribute in its attribute
+ set, false if D's attribute set is empty. */
+bool
+dict_has_attributes (const struct dictionary *d)
+{
+ return attrset_count (&d->attributes) > 0;
+}
+